# Maintainer (Arch): Dave Reisner # Maintainer (Arch): Tom Gundersen # Maintainer: André Silva pkgbase=systemd pkgname=systemd pkgver=225 pkgrel=1.parabola2 arch=('i686' 'x86_64') url="http://www.freedesktop.org/wiki/Software/systemd" makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt' 'libmicrohttpd' 'libxslt' 'util-linux' 'linux-libre-api-headers' 'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git') options=('strip' 'debug') source=("git://github.com/systemd/systemd.git#tag=v$pkgver" "https://repo.parabola.nu/other/systemd/splash-parabola.bmp" 'initcpio-hook-udev' 'initcpio-install-systemd' 'initcpio-install-udev' 'parabola.conf' 'loader.conf') md5sums=('SKIP' 'db7c5e4aaa501c1af4301e011f4f5966' '90ea67a7bb237502094914622a39e281' '976c5511b6493715e381f43f16cdb151' '1b3aa3a0551b08af9305d33f85b5c2fc' '36ee74767ac8734dede1cbd0f4f275d7' '9b9f4a58e4c4009bf5290c5b297600c3') prepare() { cd "$pkgname" # Rename "Linux" -> "GNU/Linux" sed -i 's|for Linux|for GNU/Linux|' man/daemon.xml man/systemd.xml sed -i 's|of Linux|of GNU/Linux|' man/daemon.xml man/systemd.nspawn.xml sed -i 's|the Linux|the GNU/Linux|' man/bootup.xml man/daemon.xml sed -i '\|missing| s|Linux|GNU/Linux|' man/kernel-install.xml sed -i 's|UNIX/Linux|UNIX-like/Linux-like/GNU|' man/machinectl.xml sed -i 's|to Linux|to GNU/Linux|' man/sd_bus_error_add_map.xml sed -i 's|arbitrary Linux system|arbitrary GNU/Linux system|' man/sd-bus-errors.xml sed -i 's|For Linux abstract|For GNU/Linux abstract' man/sd_is_fifo.xml sed -i 's|as Linux abstract|as GNU/Linux abstract' man/sd_notify.xml sed -i 's|individual Linux|individual GNU/Linux|;s|inside a Linux|inside a GNU/Linux|' man/systemd.xml sed -i '\|on Linux| s|Linux|GNU/Linux|' man/daemon.xml man/sd-login.xml man/systemd-logind.service.xml sed -i '\|Linux container| s|Linux|GNU/Linux|' man/systemd.xml man/systemd-machine-id-setup.xml sed -i 's|Linux-based|GNU/Linux-based|' man/systemd-nspawn.xml sed -i '\|On Linux| s|Linux|GNU/Linux|'man/systemd.socket.xml sed -i '\|NAME=| s|Linux|GNU/Linux|;\|ID=| s|linux|gnu+linux|' man/os-release.xml sed -i '\|os_pretty_name| s|Linux|GNU/Linux|' src/analyze/analyze.c sed -i '\|pretty_name| s|Linux|GNU/Linux|' src/core/main.c sed -i '\|os_name| s|Linux|GNU/Linux|' src/journal-remote/journal-gatewayd.c sed -i '\|PRETTY_NAME| s|Linux|GNU/Linux|' man/os-release.xml src/kernel-install/90-loaderentry.install # Rename "Arch Linux", "arch-tree" -> "Parabola GNU/Linux-libre", "parabola-tree" # Rename "Debian", "debian", "debian-tree" -> "gNewSense", "gnewsense", "gnewsense-tree" # Rename "Fedora", "fedora" -> "BLAG", "blag" sed -i 's|Arch Linux|Parabola GNU/Linux-libre|;s|arch-tree|parabola-tree| s|Debian|gNewSense|;s|debian-tree|gnewsense-tree| s|Fedora|BLAG|;s|fedora|blag| s|ftp.halifax.rwth-aachen.de|blag.example.org|;s|Cloud|SaaS| ' man/systemd-nspawn.xml sed -i 's| (Beefy Miracle)| (170k)| \|NAME=| s|Fedora|BLAG|;\|NAME=| s|Debian GNU/Linux|gNewSense| \|ID=| s|fedora|blag|;\|ID=| s|debian|gnewsense| \|PRETTY_NAME| s|Fedora|BLAG| s|fedoraproject.org|blagblagblag.org|;s|bugzilla.redhat.com|blagblagblag.org| s|:fedoraproject|:blagblagblag| ' man/os-release.xml # Rename "Linux Boot Manager" -> "Systemd Boot Manager" sed -i 's|Linux Boot Manager|Systemd Boot Manager|' src/boot/bootctl.c ./autogen.sh } build() { cd "$pkgname" local timeservers=({0..3}.arch.pool.ntp.org) ./configure \ --libexecdir=/usr/lib \ --localstatedir=/var \ --sysconfdir=/etc \ --enable-lz4 \ --enable-compat-libs \ --enable-gnuefi \ --disable-audit \ --disable-ima \ --disable-kdbus \ --with-sysvinit-path= \ --with-sysvrcnd-path= \ --with-ntp-servers="${timeservers[*]}" make } package_systemd() { pkgdesc="system and service manager (Parabola rebranded)" license=('GPL2' 'LGPL2.1') depends=('acl' 'bash' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap' 'libgcrypt' "libsystemd=$pkgver" 'libidn' 'lz4' 'pam' 'libseccomp' 'util-linux' 'xz') provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver") replaces=('nss-myhostname' 'systemd-tools' 'udev') conflicts=('nss-myhostname' 'systemd-tools' 'udev') optdepends=('cryptsetup: required for encrypted block devices' 'libmicrohttpd: remote journald capabilities' 'quota-tools: kernel-level quota management' 'systemd-sysvcompat: symlink package to provide sysvinit binaries' 'polkit: allow administration as unprivileged user') 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) install="systemd.install" make -C "$pkgname" DESTDIR="$pkgdir" install # 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" # ship default policy to leave services disabled echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset ### split out manpages for sysvcompat rm -rf "$srcdir/_sysvcompat" install -dm755 "$srcdir"/_sysvcompat/usr/share/man/man8/ mv "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \ "$srcdir"/_sysvcompat/usr/share/man/man8 ### split off runtime libraries rm -rf "$srcdir/_libsystemd" install -dm755 "$srcdir"/_libsystemd/usr/lib cd "$srcdir"/_libsystemd mv "$pkgdir"/usr/lib/lib{systemd,udev}*.so* usr/lib # add example bootctl configuration install -Dm644 "$srcdir/parabola.conf" "$pkgdir"/usr/share/systemd/bootctl/parabola.conf install -Dm644 "$srcdir/loader.conf" "$pkgdir"/usr/share/systemd/bootctl/loader.conf install -Dm644 "$srcdir/splash-parabola.bmp" "$pkgdir"/usr/share/systemd/bootctl/splash-parabola.bmp } # vim: ft=sh syn=sh et