summaryrefslogtreecommitdiff
path: root/libre/systemd
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-25 17:43:11 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-25 17:45:35 -0400
commit90eb3e2ada0d1e00d99ae15961dc6e639839bf6d (patch)
tree45f085fb98f3d668424c7d81970fb1c2758c7b97 /libre/systemd
parentfc136c3ce8b9cb4ba6dacf014cccc3a3625a7ba2 (diff)
downloadabslibre-90eb3e2ada0d1e00d99ae15961dc6e639839bf6d.tar.gz
abslibre-90eb3e2ada0d1e00d99ae15961dc6e639839bf6d.tar.bz2
abslibre-90eb3e2ada0d1e00d99ae15961dc6e639839bf6d.zip
libre/systemd: further split the package
Also, put library-related files (man pages, includes, pkgconfig entries) in the package with the library. Splitting out the libraries should help with the openrc efforts. Or at least avoid the awkward repackaging of libsystemd that is currently happening.
Diffstat (limited to 'libre/systemd')
-rw-r--r--libre/systemd/PKGBUILD99
1 files changed, 81 insertions, 18 deletions
diff --git a/libre/systemd/PKGBUILD b/libre/systemd/PKGBUILD
index 7ce39780f..11067955f 100644
--- a/libre/systemd/PKGBUILD
+++ b/libre/systemd/PKGBUILD
@@ -4,7 +4,8 @@
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
pkgbase=systemd
-pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat')
+pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat'
+ 'libsystemd-standalone' 'libudev' 'nss-myhostname' 'nss-mymachines' 'nss-resolve')
pkgver=229
pkgrel=3.parabola1
arch=('i686' 'x86_64' 'armv7h')
@@ -101,6 +102,38 @@ build() {
--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() {
@@ -109,9 +142,9 @@ package_systemd() {
depends=('acl' 'bash' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap'
'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'
@@ -139,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.
@@ -177,12 +210,6 @@ 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
@@ -190,12 +217,51 @@ package_systemd() {
}
package_libsystemd() {
- pkgdesc="systemd client libraries"
+ 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' 'libudev.so')
+ 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')
- make -C "$pkgbase" DESTDIR="$pkgdir" install-libLTLIBRARIES
+ cp -rT -d --no-preserve=ownership,timestamp "$srcdir/dest/$pkgname" "$pkgdir"
}
package_systemd-sysvcompat() {
@@ -205,10 +271,7 @@ package_systemd-sysvcompat() {
conflicts=('sysvinit')
depends=('systemd')
- install -dm755 "$pkgdir"/usr/share/man/man8
- cp -d --no-preserve=ownership,timestamp \
- "$pkgbase"/man/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
- "$pkgdir"/usr/share/man/man8
+ 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