1 # Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>
5 pkgdesc="A replacement for sysvinit, and other init schemes, with service supervision"
6 url="http://smarden.org/runit/"
9 depends=('bash' 'util-linux-ng')
10 makedepends=('gcc' 'make' 'coreutils' 'sed')
13 source=( http://smarden.org/runit/runit-$pkgver.tar.gz 1 2 3)
15 md5sums=('8fa53ea8f71d88da9503f62793336bc3'
16 'd6d65dedc76ba7d590afcd9cf65e136a'
17 '07f611e6db95f68a3c66187c74d6e05b'
18 '867b4d57a6fea20d32321615aad5b602')
19 sha256sums=('ffcf2d27b32f59ac14f2d4b0772a3eb80d9342685a2042b7fbbc472c07cf2a2c'
20 'd51e713c3b60149c82c897016a6c007065525dfe91384f9b140aec5280b05fd5'
21 'd3ba839507835b70458cef1f33593bf65398d56cd12da43551d20b770b3d514a'
22 '23e8557456a32c79c2688e656cfde0edde20d2103ba5cc519640cf0d479485ec')
27 'etc/runit/ctrlaltdel'
29 'etc/runit/runsvdir/all'
30 'etc/runit/runsvdir/all/getty-1/run'
31 'etc/runit/runsvdir/all/getty-1/finish'
32 'etc/runit/runsvdir/all/getty-2/run'
33 'etc/runit/runsvdir/all/getty-2/finish'
34 'etc/runit/runsvdir/all/getty-3/run'
35 'etc/runit/runsvdir/all/getty-3/finish'
36 'etc/runit/runsvdir/all/getty-4/run'
37 'etc/runit/runsvdir/all/getty-4/finish')
40 cd $startdir/src/admin/$pkgname-$pkgver/src
43 # we build nothing static
44 sed -i -e 's:-static: :' Makefile || return 1
45 # apply custom CFLAGS and LDFLAGS
46 echo "${CC:-gcc} $CFLAGS" > conf-cc || return 1
47 echo "${CC:-gcc -s} $LDFLAGS" > conf-ld || return 1
48 # set default service path to /var/service
49 sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c || return 1
53 make check || return 1
56 install -d -m0755 ${startdir}/pkg/etc/runit/runsvdir/pkg-default || return 1
57 install -d -m0755 ${startdir}/pkg/etc/runit/runsvdir/all || return 1
58 install -d -m0755 ${startdir}/pkg/var || return 1
61 install -m0755 $startdir/src/[123] ${startdir}/pkg/etc/runit || return 1
62 install -m0755 $startdir/src/admin/$pkgname-$pkgver/etc/debian/ctrlaltdel ${startdir}/pkg/etc/runit || return 1
64 ln -s ../etc/runit/runsvdir/current ${startdir}/pkg/var/service || return 1
67 install -d -m0755 ${startdir}/pkg/sbin || return 1
68 for i in `cat $startdir/src/admin/$pkgname-$pkgver/package/commands`
70 install -s -m0755 $startdir/src/admin/$pkgname-$pkgver/src/$i ${startdir}/pkg/sbin || return 1
74 install -d -m0755 ${startdir}/pkg/usr/share/man/man8 || return 1
75 install -m0644 $startdir/src/admin/$pkgname-$pkgver/man/* ${startdir}/pkg/usr/share/man/man8 || return 1
78 install -d -m0755 ${startdir}/pkg/usr/share/doc/runit || return 1
79 install -m0644 $startdir/src/admin/$pkgname-$pkgver/doc/*.html ${startdir}/pkg/usr/share/doc/runit || return 1
81 # add gettys for 1-4 terminals
82 cd $startdir/src/admin/$pkgname-$pkgver/etc/debian/getty-tty5/ || return 1
85 install -d -m0755 ${startdir}/pkg/etc/runit/runsvdir/all/getty-$i || return 1
86 ln -s ../all/getty-$i "${startdir}/pkg/etc/runit/runsvdir/pkg-default/" || return 1
89 sed "s/tty5/tty$i/g;s/getty/agetty/g" <"$f" >"${startdir}/pkg/etc/runit/runsvdir/all/getty-$i/$f" || return 1
90 chmod 0755 "${startdir}/pkg/etc/runit/runsvdir/all/getty-$i/$f"
94 install -D $startdir/src/admin/runit-$pkgver/package/COPYING $startdir/pkg/usr/share/licenses/runit/COPYING