summaryrefslogtreecommitdiff
path: root/libre/systemd/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/systemd/PKGBUILD')
-rw-r--r--libre/systemd/PKGBUILD167
1 files changed, 137 insertions, 30 deletions
diff --git a/libre/systemd/PKGBUILD b/libre/systemd/PKGBUILD
index d474ad448..48b23cfde 100644
--- a/libre/systemd/PKGBUILD
+++ b/libre/systemd/PKGBUILD
@@ -1,36 +1,49 @@
# Maintainer (Arch): Dave Reisner <dreisner@archlinux.org>
# Maintainer (Arch): Tom Gundersen <teg@jklm.no>
# Maintainer: André Silva <emulatorman@parabola.nu>
+# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
pkgbase=systemd
-pkgname=systemd
+pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat'
+ 'libsystemd-standalone' 'libudev' 'nss-myhostname' 'nss-mymachines' 'nss-resolve')
pkgver=229
-pkgrel=3.parabola1
+pkgrel=3.parabola2
arch=('i686' 'x86_64' 'armv7h')
url="http://www.freedesktop.org/wiki/Software/systemd"
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt'
- 'libmicrohttpd' 'libxslt' 'util-linux' 'linux-libre-api-headers'
+ 'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers'
'python-lxml' 'quota-tools' 'shadow' 'git')
-[ "$CARCH" != "armv7h" ] && makedepends+=('gnu-efi-libs')
+makedepends_i686=('gnu-efi-libs')
+makedepends_x86_64=('gnu-efi-libs')
options=('strip' 'debug')
source=("git://github.com/systemd/systemd.git#tag=v$pkgver"
- "https://repo.parabola.nu/other/systemd/splash-parabola.bmp"{,.sig}
'initcpio-hook-udev'
'initcpio-install-systemd'
'initcpio-install-udev'
'parabola.conf'
'loader.conf'
- 'gnu+linux.patch')
+ '0001-FSDG-man-Refer-to-the-operating-system-as-GNU-Linux.patch'
+ '0002-FSDG-os-release-Default-to-PRETTY_NAME-GNU-Linux-ins.patch'
+ '0003-FSDG-os-release-Default-to-NAME-GNU-Linux-instead-of.patch'
+ '0004-FSDG-os-release-Default-ID-to-gnu-linux-instead-of-l.patch'
+ '0005-FSDG-systemd-resolved-Default-to-hostname-gnu-linux-.patch'
+ '0006-FSDG-man-Use-FSDG-operating-systems-as-examples.patch'
+ "https://repo.parabola.nu/other/systemd/splash-parabola.bmp"{,.sig})
md5sums=('SKIP'
- 'f8253cd3c0f249591338fbb4c223d249'
- 'SKIP'
'90ea67a7bb237502094914622a39e281'
'976c5511b6493715e381f43f16cdb151'
'1b3aa3a0551b08af9305d33f85b5c2fc'
'36ee74767ac8734dede1cbd0f4f275d7'
'9b9f4a58e4c4009bf5290c5b297600c3'
- 'd37895215ef74e172c594aebe1ba23cb')
+ '92a4bb5e527e1e956743c1ffa622adc7'
+ '35e9e89add0243f77f0b1c9be6f7bdcb'
+ 'e592f6778c12627d46982ddfe0698361'
+ 'c4c559f9916806f5162ccff3e7c433e8'
+ '5166fe700ef5991c2da3876206c699fb'
+ '166ce41b60d4eaa7738486f7aab5ebd8'
+ 'f8253cd3c0f249591338fbb4c223d249'
+ 'SKIP')
validpgpkeys=('684D54A189305A9CC95446D36B888913DDB59515') # Márcio Silva
prepare() {
@@ -48,11 +61,11 @@ prepare() {
# revert "core: resolve specifier in config_parse_exec()"
git cherry-pick -n bd1b973fb326e9b7587494fd6108e5ded46e9163
- # Rename "Linux" -> "GNU/Linux"
- patch -Np1 -i "$srcdir/gnu+linux.patch"
- sed -i '\|os_name| s|Linux|GNU/Linux|' src/journal-remote/journal-gatewayd.c
- sed -i '\|pretty_name| s|Linux|GNU/Linux|' src/analyze/analyze.c src/core/main.c src/firstboot/firstboot.c
- sed -i '\|PRETTY_NAME| s|Linux|GNU/Linux|' src/kernel-install/90-loaderentry.install
+ # apply FSDG patches
+ local patchfile
+ for patchfile in "$srcdir"/*.patch; do
+ patch -Np1 -i "$patchfile"
+ done
# Rename "Linux Boot Manager" -> "Systemd Boot Manager"
sed -i 's|Linux Boot Manager|Systemd Boot Manager|' src/boot/bootctl.c
@@ -69,8 +82,11 @@ build() {
LDFLAGS+=" -Wl,-fuse-ld=bfd"
CFLAGS+=" -fno-lto"
CXXFLAGS+=" -fno-lto"
- else
- extra=--enable-gnuefi
+ fi
+
+ local enable_gnuefi=''
+ if [ "$CARCH" != "armv7h" ]; then
+ enable_gnuefi='--enable-gnuefi'
fi
./configure \
@@ -78,25 +94,57 @@ build() {
--localstatedir=/var \
--sysconfdir=/etc \
--enable-lz4 \
+ $enable_gnuefi \
--disable-audit \
--disable-ima \
--with-sysvinit-path= \
--with-sysvrcnd-path= \
- --with-ntp-servers="${timeservers[*]}" \
- $extra
+ --with-ntp-servers="${timeservers[*]}"
make
+
+ # Go ahead and split the package now. It's easier this way, because
+ # we can use mv instead of awkward, error-prone rm/cp pairs.
+ rm -rf "$srcdir/dest"
+
+ # Put things in the main systemd package by default
+ make DESTDIR="$srcdir/dest/systemd" install
+
+ install -dm755 "$srcdir/dest/libsystemd"/usr/{lib/pkgconfig,share/man/man3,include}
+ mv -T "$srcdir/dest"/{systemd,libsystemd}/usr/include/systemd
+ mv -T "$srcdir/dest"/{systemd,libsystemd}/usr/lib/pkgconfig/libsystemd.pc
+ mv "$srcdir/dest"/systemd/usr/lib/libsystemd.so* -t "$srcdir/dest"/libsystemd/usr/lib/
+ mv "$srcdir/dest"/systemd/usr/share/man/man3/{SD,sd}* -t "$srcdir/dest"/libsystemd/usr/share/man/man3/
+
+ install -dm755 "$srcdir/dest/libudev"/usr/{lib/pkgconfig,share/man/man3,include}
+ mv -T "$srcdir/dest"/{systemd,libudev}/usr/include/libudev.h
+ mv -T "$srcdir/dest"/{systemd,libudev}/usr/lib/pkgconfig/libudev.pc
+ mv "$srcdir/dest"/systemd/usr/lib/libudev.so* -t "$srcdir/dest"/libudev/usr/lib/
+ mv "$srcdir/dest"/systemd/usr/share/man/man3/*udev* -t "$srcdir/dest"/libudev/usr/share/man/man3/
+
+ local nssmodule
+ for nssmodule in myhostname mymachines resolve; do
+ install -dm755 "$srcdir/dest/nss-$nssmodule"/usr/{lib,share/man/man8}
+ mv -T "$srcdir/dest"/{systemd,nss-$nssmodule}/usr/share/man/man8/nss-$nssmodule.8
+ mv "$srcdir/dest"/systemd/usr/lib/libnss_$nssmodule.so* -t "$srcdir/dest"/nss-$nssmodule/usr/lib/
+ done
+
+ install -dm755 "$srcdir/dest/systemd-sysvcompat"/usr/share/man/man8
+ mv "$srcdir/dest/systemd"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
+ -t "$srcdir/dest/systemd-sysvcompat"/usr/share/man/man8
+
+ rmdir "$srcdir/dest"/systemd/usr/{share/man/man3,lib/pkgconfig,include}
}
package_systemd() {
- pkgdesc="system and service manager (Parabola rebranded)"
+ pkgdesc="system and service manager"
license=('GPL2' 'LGPL2.1')
depends=('acl' 'bash' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap'
- 'libgcrypt' "libsystemd=$pkgver" 'libidn' 'lz4' 'pam' 'libelf' 'libseccomp'
+ 'libgcrypt' 'libsystemd' 'libidn' 'lz4' 'pam' 'libelf' 'libseccomp'
'util-linux' 'xz')
- provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
- replaces=('nss-myhostname' 'systemd-tools' 'udev')
- conflicts=('nss-myhostname' 'systemd-tools' 'udev')
+ provides=("systemd-tools=$pkgver" "udev=$pkgver")
+ replaces=('systemd-tools' 'udev')
+ conflicts=('systemd-tools' 'udev')
optdepends=('cryptsetup: required for encrypted block devices'
'libmicrohttpd: remote journald capabilities'
'quota-tools: kernel-level quota management'
@@ -124,7 +172,7 @@ package_systemd() {
etc/udev/udev.conf)
install="systemd.install"
- make -C "$pkgbase" DESTDIR="$pkgdir" install
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/$pkgname" "$pkgdir"
# don't write units to /etc by default. some of these will be re-enabled on
# post_install.
@@ -162,16 +210,75 @@ package_systemd() {
# ship default policy to leave services disabled
echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
- ### manpages shipped with systemd-sysvcompat
- rm "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
-
- ### runtime libraries shipped with libsystemd
- rm "$pkgdir"/usr/lib/lib{nss,systemd,udev}*.so*
-
# 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
}
+package_libsystemd() {
+ pkgdesc="systemd client libraries metapackage"
+ depends=(libsystemd-standalone libudev nss-myhostname nss-mymachines nss-resolve)
+ license=('GPL2')
+}
+
+package_libsystemd-standalone() {
+ pkgdesc="systemd client library"
+ depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
+ license=('GPL2')
+ provides=('libsystemd.so')
+
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/libsystemd" "$pkgdir"
+}
+
+package_libudev() {
+ pkgdesc="systemd library for enumerating and introspecting local devices"
+ depends=('glibc' 'libcap')
+ license=('GPL2')
+ provides=('libudev.so')
+
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/$pkgname" "$pkgdir"
+}
+
+package_nss-myhostname() {
+ pkgdesc="NSS module providing hostname resolution for the locally configured system hostname"
+ depends=('glibc' 'libcap')
+ license=('GPL2')
+
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/$pkgname" "$pkgdir"
+}
+
+package_nss-mymachines() {
+ pkgdesc="NSS module providing hostname resolution for local systemd-machined container instances"
+ depends=('glibc' 'libcap')
+ license=('GPL2')
+
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/$pkgname" "$pkgdir"
+}
+
+package_nss-resolve() {
+ pkgdesc="NSS module providing hostname resolution via systemd-resolved"
+ depends=('glibc' 'libcap')
+ license=('GPL2')
+
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/$pkgname" "$pkgdir"
+}
+
+package_systemd-sysvcompat() {
+ pkgdesc="sysvinit compat for systemd"
+ license=('GPL2')
+ groups=('base')
+ conflicts=('sysvinit')
+ depends=('systemd')
+
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/$pkgname" "$pkgdir"
+
+ install -dm755 "$pkgdir/usr/bin"
+ for tool in runlevel reboot shutdown poweroff halt telinit; do
+ ln -s 'systemctl' "$pkgdir/usr/bin/$tool"
+ done
+
+ ln -s '../lib/systemd/systemd' "$pkgdir/usr/bin/init"
+}
+
# vim: ft=sh syn=sh et