blob: 1168141a4a06b7c611a8de012f5f868e51f70eb1 (
plain) (
tree)
|
|
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=sysvinit
pkgver=3.06
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://github.com/slicer69/sysvinit/releases/download/$pkgver/$pkgname-$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
# e2fsprogs
sed -i -r \
-e '/^(USR)?S?BIN/s:\<logsave\>::g' \
-e '/^MAN8/s:\<logsave\.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="dc56ce12f18f7ecde6c9828e72dd8ab7afccd0f88ad4438d6a5b356a30b21e9ba9c796a4b2520a20a0c384f058be6bdb7b9b0df9786bbf65a80dff97c2be733b sysvinit-3.06.tar.xz
87668b49690091a227c0384fd2400f1006d24c27cc27a25efa7eba56839ccb1eead00b58ce4b654eab9c0208d68aa2cbb888fd5f2990905845aa9688442a69a0 inittab-2.88
187dbef4452624ac9035994edbbefa9efd8847ff307002703ca35cfa149780c7e1addb38859dbfdb5dd1e046510418ee493fa3dfdfcc5706c262b1238c7cc39e utmpx.patch
e52fd49daa5abfc583f1973f3428b1e00a71e7136a8bc6418e94b345d53ef250b3b3c3bee389fe37872b26a78d0957ae852e221428f33b2c728dfd3d50b59634 s6-svscanboot"
|