blob: ddcba5cc3faa91fcc52a93322f74723f55296cb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: David P. <megver83@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@parabola.nu>
# Maintainer (Artix): Chris Cromer <chris@artixlinux.org>
# Note: have opensysusers-manpages as a separate package, so that
# notsystemd (which also includes sysusers.d(5)) and opensysusers
# don't conflict.
pkgbase=opensysusers
pkgname=('opensysusers' 'opensysusers-manpages' 'opensysusers-systemdcompat')
pkgver=0.4.8
pkgrel=4
pkgdesc="A standalone utility to handle systemd-style sysusers.d files"
arch=('any')
url="https://github.com/artix-linux/opensysusers"
license=('BSD2')
makedepends=('docbook-xsl')
depends=('shadow')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/artix-linux/${pkgname}/archive/${pkgver}.tar.gz"
'opensysusers.hook')
sha256sums=('4d1bf4657e8a2420d8dcf8da63f86809e3f023603a0940b86e4d10d0f42a0720'
'713ca6dcc491217307e812900f0bf4cfbc0315456aa382e41d4037565095fe53')
build() {
cd "$srcdir/$pkgbase-$pkgver"
make PREFIX=/usr HAVESYSTEMD=no HAVEOPENRC=yes HAVEMAN=yes
make PREFIX=/usr HAVESYSTEMD=yes HAVEOPENRC=no HAVEMAN=no
}
package_opensysusers() {
groups=('base-openrc')
optdepends=(
'opensysusers-manpages'
'opensysusers-systemdcompat'
)
cd "$srcdir/$pkgbase-$pkgver"
install -d "$pkgdir"/usr/bin
make PREFIX=/usr HAVESYSTEMD=no HAVEOPENRC=yes HAVEMAN=yes DESTDIR="$pkgdir" install
find "$pkgdir" -type f -name 'systemd-*' -delete
rm -rf "$pkgdir"/usr/share/man/man5
find "$pkgdir" -depth -type d -empty -exec rmdir -- {} \;
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# OpenRC defaults
install -d "$pkgdir"/etc/runlevels/boot
ln -sT /etc/init.d/opensysusers "$pkgdir"/etc/runlevels/boot/opensysusers
# pacman hooks
install -Dm0644 ../opensysusers.hook "$pkgdir"/usr/share/libalpm/hooks/opensysusers.hook
}
package_opensysusers-manpages() {
pkgdesc='Manual page for sysusers.d'
conflicts=('systemd') # because of the sysusers.d(5) manpage
cd "$srcdir/$pkgbase-$pkgver"
make PREFIX=/usr HAVESYSTEMD=no HAVEOPENRC=yes HAVEMAN=yes DESTDIR="$srcdir/manpages" install
install -d "$pkgdir"/usr/share/man
mv -T {"$srcdir/manpages","$pkgdir"}/usr/share/man/man5
rm -rf "$srcdir/manpages"
}
package_opensysusers-systemdcompat() {
pkgdesc='Compatibility wrapper for opensysfiles providing the systemd-sysfiles program'
depends=("opensysusers=$pkgver")
conflicts=('systemd-tools')
cd "$srcdir/$pkgbase-$pkgver"
make PREFIX=/usr HAVESYSTEMD=yes HAVEOPENRC=no HAVEMAN=yes DESTDIR="$pkgdir" install BINNAME=systemd-sysusers
find "$pkgdir" -type f -not -name 'systemd-*' -delete
find "$pkgdir" -depth -type d -empty -exec rmdir -- {} \;
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|