# maintainer: Fabian Kosmale pkgname=systemd pkgver=231 pkgrel=4 pkgdesc="A system and service manager for Linux" arch=('x86_64') url="http://www.freedesktop.org/wiki/Software/systemd" license=('GPL2' 'LGPL2.1' 'MIT') depends=('acl' 'bash' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap' 'libgcrypt' 'glibc' 'libidn' 'lz4' 'pam' 'libseccomp' 'util-linux' 'xz' 'libxkbcommon>=0.5.0-2' 'gnutls' 'elfutils') makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt' 'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers' 'python' 'python2-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git' 'curl') optdepends=('curl: upload journal and pull image' 'cryptsetup: required for encrypted block devices' 'libmicrohttpd: remote journald capabilities' 'quota-tools: kernel-level quota management' 'polkit: allow administration as unprivileged user') options=('debug') backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf etc/dbus-1/system.d/org.freedesktop.hostname1.conf etc/dbus-1/system.d/org.freedesktop.login1.conf etc/dbus-1/system.d/org.freedesktop.locale1.conf etc/dbus-1/system.d/org.freedesktop.machine1.conf etc/dbus-1/system.d/org.freedesktop.timedate1.conf etc/dbus-1/system.d/org.freedesktop.import1.conf etc/dbus-1/system.d/org.freedesktop.network1.conf etc/pam.d/systemd-user etc/systemd/bootchart.conf etc/systemd/coredump.conf etc/systemd/journald.conf etc/systemd/journal-remote.conf etc/systemd/journal-upload.conf etc/systemd/logind.conf etc/systemd/system.conf etc/systemd/timesyncd.conf etc/systemd/resolved.conf etc/systemd/user.conf etc/udev/udev.conf) provides=("udev=$pkgver" 'gummiboot') conflicts=('udev' 'sysvinit' 'initscripts' 'initscripts-systemd' 'gummiboot') replaces=('udev' 'gummiboot') install="systemd.install" source=("git+https://github.com/systemd/systemd.git#tag=v$pkgver" 'initcpio-hook-udev' 'initcpio-install-systemd' 'initcpio-install-udev' '99-default.preset' 'chakra.conf' 'chakra_fallback.conf' 'loader.conf' 'splash-chakra.bmp') md5sums=('SKIP' '90ea67a7bb237502094914622a39e281' '19185c46811f7e056a760864870bfb4c' '1b3aa3a0551b08af9305d33f85b5c2fc' '34c0e45a4c7b598d57a5efcf63ecee2f' '0fdb041cc891292162f6c2f7d1af830c' 'bfccc8b2a9da47823e4dcef2206d4b1b' '88949acaf49231fd01e9f0733c5dd812' '3f1e033e9334e33d6e15f3bf7ce076e3') prepare() { cd "$pkgname" ./autogen.sh } build() { cd "$pkgname" local timeservers=({0..3}.chakra.pool.ntp.org) ./configure \ --libexecdir=/usr/lib \ --localstatedir=/var \ --sysconfdir=/etc \ --enable-introspection \ --disable-gtk-doc \ --enable-lz4 \ --enable-gnuefi \ --disable-audit \ --disable-ima \ --with-sysvinit-path= \ --with-sysvrcnd-path= \ --with-ntp-servers="${timeservers[*]}" \ --with-default-dnssec=no #--without-kill-user-processes make } package() { make -C "$pkgname" DESTDIR="$pkgdir" install install -dm755 "$pkgdir/usr/bin" ln -s ../../usr/lib/systemd/systemd "$pkgdir/usr/bin/systemd" install -dm755 "$pkgdir/usr/sbin" for tool in runlevel reboot shutdown poweroff halt telinit; do ln -s '/usr/bin/systemctl' "$pkgdir/usr/sbin/$tool" done ln -s '../lib/systemd/systemd' "$pkgdir/usr/sbin/init" # the path to udevadm is hardcoded in some places ln -s ../bin/udevadm "$pkgdir/usr/sbin/udevadm" # udevd is no longer udevd because systemd. why isn't udevadm now udevctl? ln -s ../lib/systemd/systemd-udevd "$pkgdir/usr/bin/udevd" # don't write units to /etc by default. some of these will be re-enabled on # post_install. rm -r "$pkgdir/etc/systemd/system/"*.wants # get rid of RPM macros rm -r "$pkgdir/usr/lib/rpm" # add back tmpfiles.d/legacy.conf install -m644 "$pkgname/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d" # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group sed -i 's#GROUP="dialout"#GROUP="uucp"#g; s#GROUP="tape"#GROUP="storage"#g; s#GROUP="cdrom"#GROUP="optical"#g' "$pkgdir"/usr/lib/udev/rules.d/*.rules sed -i 's/dialout/uucp/g; s/tape/storage/g; s/cdrom/optical/g' "$pkgdir"/usr/lib/sysusers.d/basic.conf # add mkinitcpio hooks install -Dm644 "$srcdir/initcpio-install-systemd" "$pkgdir/usr/lib/initcpio/install/systemd" install -Dm644 "$srcdir/initcpio-install-udev" "$pkgdir/usr/lib/initcpio/install/udev" install -Dm644 "$srcdir/initcpio-hook-udev" "$pkgdir/usr/lib/initcpio/hooks/udev" # ensure proper permissions for /var/log/journal. This is only to placate chown root:systemd-journal "$pkgdir/var/log/journal" chmod 2755 "$pkgdir/var/log/journal" # we'll create this on installation rmdir "$pkgdir/var/log/journal/remote" # fix pam file sed 's|system-auth|system-login|g' -i "$pkgdir/etc/pam.d/systemd-user" # Chakra specific .preset install -Dm644 "$srcdir/99-default.preset" "$pkgdir/usr/lib/systemd/system-preset/99-default.preset" # Make journalctl persistent install -dm755 "$pkgdir/var/log/journal" sed -i -e 's/#SystemMaxUse=/SystemMaxUse=25M/' ${pkgdir}/etc/systemd/journald.conf # add example bootctl configuration install -Dm644 "$srcdir/chakra.conf" "$pkgdir"/usr/share/systemd/bootctl/chakra.conf install -Dm644 "$srcdir/chakra_fallback.conf" "$pkgdir"/usr/share/systemd/bootctl/chakra_fallback.conf install -Dm644 "$srcdir/loader.conf" "$pkgdir"/usr/share/systemd/bootctl/loader.conf install -Dm644 "$srcdir/splash-chakra.bmp" "$pkgdir"/usr/share/systemd/bootctl/splash-chakra.bmp }