systemd/PKGBUILD
2024-10-16 02:37:46 +08:00

124 lines
5.0 KiB
Bash

# Maintainer: Future Linux Team <futurelinux@163.com>
pkgname=systemd
pkgver=256.5
pkgrel=1
pkgdesc="system and service manager"
arch=('x86_64')
url="https://www.freedesktop.org/wiki/Software/systemd/"
license=('LGPL-2.1-or-later')
groups=('base')
depends=('glibc' 'gcc-libs' 'libcap' 'libgcrypt' 'xz' 'zstd'
'acl' 'bash' 'cryptsetup' 'dbus' 'kbd' 'kmod' 'lz4'
'libxcrypt' 'libidn2' 'linux-pam' 'libelf' 'libseccomp'
'util-linux' 'pcre2' 'openssl' 'libpwquality'
'python-jinja2' 'python-pefile')
makedepends=('btrfs-progs' 'gperf' 'intltool' 'linux-api-headers'
'shadow' 'git' 'meson' 'p11-kit' 'curl' 'gnutls' 'ca-certificates' 'rsync'
'gnu-efi' 'docbook-xml' 'docbook-xsl' 'libxslt' 'python-lxml' 'polkit'
'python-pyelftools' 'libmicrohttpd' 'bash-completion')
backup=(etc/pam.d/systemd-user
etc/systemd/coredump.conf
etc/systemd/homed.conf
etc/systemd/journal-upload.conf
etc/systemd/journald.conf
etc/systemd/logind.conf
etc/systemd/networkd.conf
etc/systemd/oomd.conf
etc/systemd/pstore.conf
etc/systemd/resolved.conf
etc/systemd/sleep.conf
etc/systemd/system.conf
etc/systemd/timesyncd.conf
etc/systemd/user.conf
etc/udev/iocost.conf
etc/udev/udev.conf)
install=${pkgname}.install
source=(https://github.com/systemd/systemd/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
30-systemd-binfmt.hook
30-systemd-catalog.hook
30-systemd-daemon-reload-system.hook
30-systemd-daemon-reload-user.hook
30-systemd-hwdb.hook
30-systemd-sysctl.hook
30-systemd-tmpfiles.hook
30-systemd-udev-reload.hook
30-systemd-update.hook
systemd-hook
systemd-user.pam)
sha256sums=(41bb91861ab9f2f2b6cadad558ea1f8764d701452b018852146d642a850c8a8b
a938701f4244ebdc4ae88ed0032a8315b68f086c6e45d9f2e34ef9442a8f6b47
be3c749ed51ee26c8412e0304a41ac5e00e668f4d5227b5f359a3b0c31d18d5d
2d2733a167ee360a36d6cc613001913deb62f199d73e86d39bfe06e669f4b066
5e35263da327771ec1b9bff1d792b0da4c802f0322e40838f07554788fc191e2
b19b23467dc33b3e8267cabea10726b0d181e0de1b491ec538b9fb620bccf57f
1af0fbaeaf974fe3d8409854179fac68e8461524dd49849b7e889374363ce3c9
3cfdc3c21d32cc35b1315f4ff4df87238bc7d2c27bdcf4e5a70600832c481e95
f6364443609b1d5a07f385e7228ace0eae5040ae3bbd4e00ed5033ef1b19e4b9
1090b7b1edba2042298b609a77bbe122982ca936208408fb79d77b33a2f3c27a
cb8c630ed261cdac797e044793726c4080a6144f9a9fd0f2f992dde9da3fd6c4
bdf4bc315b05af3e3b6a15ca9baa7ec53a6049b8e4033bedc931c0257e0fbe74)
prepare() {
cd ${pkgname}-${pkgver}
sed -i -e 's/GROUP="render"/GROUP="video"/' \
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in
}
build() {
cd ${pkgname}-${pkgver}
local _timeservers=(ntp.aliyun.com ntp{1..7}.aliyun.com)
future-meson build \
--prefix=/usr \
--libdir=/usr/lib64 \
--buildtype=release \
-Ddefault-dnssec=no \
-Dfirstboot=false \
-Dinstall-tests=false \
-Dldconfig=false \
-Dman=auto \
-Dsysusers=false \
-Drpmmacrosdir=no \
-Dhomed=enabled \
-Duserdb=true \
-Dmode=release \
-Dpam=enabled \
-Dpamconfdir=/etc/pam.d \
-Ddev-kvm-mode=0660 \
-Dnobody-group=nogroup \
-Dsysupdate=disabled \
-Dukify=enabled \
-Dlibidn2=enabled \
-Defi=true \
-Dlz4=enabled \
-Dnscd=false \
-Ddocdir=/usr/share/doc/${pkgname}-${pkgver} \
-Dntp-servers="${_timeservers[*]}" \
-Dfallback-hostname='futurelinux' \
-Dsbat-distro='future' \
-Dsbat-distro-summary="Future Linux" \
-Dsbat-distro-pkgname=${pkgname} \
-Dsbat-distro-version=${pkgver} \
-Dsbat-distro-url="https://futurelinux.xyz"
meson compile -C build
}
package() {
cd ${pkgname}-${pkgver}
meson install -C build --destdir ${pkgdir}
install -vDm644 ${srcdir}/systemd-user.pam ${pkgdir}/etc/pam.d/systemd-user
install -d -o root -g root -m 2755 ${pkgdir}/var/log/journal
# pacman hooks
install -D -m0755 ${srcdir}/systemd-hook ${pkgdir}/usr/share/libalpm/scripts/systemd-hook
install -D -m0644 -t ${pkgdir}/usr/share/libalpm/hooks ${srcdir}/*.hook
}