blob: 77b9494d7d432fdfd8250c345dfd944cfa45d116 (
plain) (
blame)
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
|
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=sysvinit
pkgver=3.04
pkgrel=0
pkgdesc="System V-style init programs"
url="https://savannah.nongnu.org/projects/sysvinit"
arch="all"
license="GPL-2.0+"
depends="s6-linux-init-common"
makedepends="linux-headers utmps-dev"
install="sysvinit.post-upgrade sysvinit.post-install"
options="!check"
provides="/sbin/init=0"
subpackages="$pkgname-doc"
source="https://download.savannah.nongnu.org/releases/sysvinit/sysvinit-${pkgver}.tar.xz
inittab-2.88
utmpx.patch
s6-svscanboot
"
prepare() {
default_prepare
# util-linux
sed -i -r \
-e '/^(USR)?S?BIN/s:\<(last|lastb|mesg)\>::g' \
-e '/^MAN[18]/s:\<(last|lastb|mesg)[.][18]\>::g' \
src/Makefile
# broken
sed -i -r \
-e '/^USRBIN/s:utmpdump::g' \
-e '/^MAN1/s:utmpdump\.1::g' \
src/Makefile
# procps
sed -i -r \
-e '/\/bin\/pidof/d'\
-e '/^MAN8/s:\<pidof.8\>::g' \
src/Makefile
}
build() {
export DISTRO="Adélie"
make -C src
}
_install_s6_stuff() {
svcimg="$pkgdir/etc/s6-linux-init/current/run-image/service"
mkdir -p -m 0755 "$pkgdir/sbin" "$svcimg/.s6-svscan" "$svcimg/s6-svscan-log"
{ echo '#!/bin/execlineb -P' ; echo 'false' ; } > "$svcimg/.s6-svscan/crash"
chmod 0755 "$svcimg/.s6-svscan/crash"
{ echo '#!/bin/execlineb -P' ; echo 's6-svc -x -- /run/service/s6-svscan-log' ; } > "$svcimg/.s6-svscan/finish"
chmod 0755 "$svcimg/.s6-svscan/finish"
{ echo '#!/bin/execlineb -P' ; echo 'redirfd -rnb 0 fifo' ; echo 's6-setuidgid catchlog' ; echo 's6-log -bd3 -- t /run/uncaught-logs' ; } > "$svcimg/s6-svscan-log/run"
chmod 0755 "$svcimg/s6-svscan-log/run"
install -D -m 0755 "$srcdir"/s6-svscanboot "$pkgdir/sbin/s6-svscanboot"
}
package() {
make -C src install ROOT="$pkgdir"
rm "$pkgdir"/usr/bin/lastb || true
install -D -m644 "$srcdir"/inittab-2.88 "$pkgdir"/etc/inittab
_install_s6_stuff
}
sha512sums="059092ee857782e88f88e47475846f859589aa1062a6e1294fe8983a11d04a13811e0dd6d277431f45abc2d9d96e5358f6b2d2df1d291402fada66cd009a5fa9 sysvinit-3.04.tar.xz
87668b49690091a227c0384fd2400f1006d24c27cc27a25efa7eba56839ccb1eead00b58ce4b654eab9c0208d68aa2cbb888fd5f2990905845aa9688442a69a0 inittab-2.88
187dbef4452624ac9035994edbbefa9efd8847ff307002703ca35cfa149780c7e1addb38859dbfdb5dd1e046510418ee493fa3dfdfcc5706c262b1238c7cc39e utmpx.patch
e52fd49daa5abfc583f1973f3428b1e00a71e7136a8bc6418e94b345d53ef250b3b3c3bee389fe37872b26a78d0957ae852e221428f33b2c728dfd3d50b59634 s6-svscanboot"
|