base/src/systemd/pkg.sh
2024-08-11 02:03:08 +03:00

82 lines
2.1 KiB
Bash

# general info
NAME="systemd"
DESC="System and service manager"
VERSION="255"
# required files
FILES=(
"https://github.com/systemd/systemd/archive/v${VERSION}/systemd-${VERSION}.tar.gz"
"https://anduin.linuxfromscratch.org/LFS/systemd-man-pages-${VERSION}.tar.xz"
"systemd-${VERSION}-upstream_fixes-1.patch"
)
HASHES=(
"521cda27409a9edf0370c128fae3e690"
"1ebe54d7a80f9abf8f2d14ddfeb2432d"
"8d9c1014445c463cf7c24c162b1e0686"
)
# install and build depends
DEPENDS=(
"acl" "bash" "dbus"
"kbd" "kmod" "libcap"
"libelf" "libgcrypt" "libidn2"
"openssl" "libxcrypt" "libseccomp"
"xz" "util-linux" "pcre2"
"linux-pam"
)
BUILD=("shadow" "curl")
PACKAGE(){
tar xf "${NAME}-${VERSION}.tar.gz"
cd "${NAME}-${VERSION}"
sed -i -e 's/GROUP="render"/GROUP="video"/' \
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in
patch -Np1 -i "../systemd-${VERSION}-upstream_fixes-1.patch"
mkdir -p build
cd build
meson setup \
--prefix=/usr \
--buildtype=release \
-Ddefault-dnssec=no \
-Dfirstboot=false \
-Dinstall-tests=false \
-Dldconfig=false \
-Dsysusers=false \
-Drpmmacrosdir=no \
-Dhomed=disabled \
-Duserdb=false \
-Dman=disabled \
-Dmode=release \
-Dpamconfdir=no \
-Ddev-kvm-mode=0660 \
-Dnobody-group=nogroup \
-Dsysupdate=disabled \
-Dukify=disabled \
-Ddns-servers="94.140.14.14#94.140.15.15" \
-Ddocdir=/usr/share/doc/systemd-255 \
..
ninja
install -dm755 "${ROOTDIR}/usr/share/man"
install -dm755 "${ROOTDIR}/etc"
DESTDIR="${ROOTDIR}" ninja install
tar -xf "../../systemd-man-pages-${VERSION}.tar.xz" \
--no-same-owner --strip-components=1 \
-C "${ROOTDIR}/usr/share/man"
cd ../.. && rm -r "${NAME}-${VERSION}"
}
INSTALL(){
useradd systemd-timesync
useradd systemd-resolve
useradd systemd-network
systemd-machine-id-setup
exit 0
}