New package: runit-2.1.1.

This commit is contained in:
Juan RP 2014-02-11 02:37:56 +01:00
parent fe7d996ac6
commit 6d1e15d684
2 changed files with 88 additions and 0 deletions

View File

@ -0,0 +1,48 @@
chskshsgr must be built for the host.
--- runit-2.1.1/src/Makefile.orig 2014-02-11 02:03:33.904789349 +0100
+++ runit-2.1.1/src/Makefile 2014-02-11 02:19:28.968055164 +0100
@@ -170,11 +170,11 @@ byte_diff.o: byte.h byte_diff.c compile
byte_rchr.o: byte.h byte_rchr.c compile
./compile byte_rchr.c
-chkshsgr: chkshsgr.o load
- ./load chkshsgr
+chkshsgr: chkshsgr.o loadhost
+ ./loadhost chkshsgr
-chkshsgr.o: chkshsgr.c compile
- ./compile chkshsgr.c
+chkshsgr.o: chkshsgr.c compilehost
+ ./compilehost chkshsgr.c
choose: choose.sh warn-auto.sh
rm -f choose
@@ -185,6 +185,11 @@ choose: choose.sh warn-auto.sh
coe.o: coe.c coe.h compile
./compile coe.c
+compilehost:
+ cat warn-auto.sh > compilehost
+ @echo 'exec cc -c $${1+"$$@"}' >> compilehost
+ chmod 555 compilehost
+
compile: conf-cc print-cc.sh systype warn-auto.sh
rm -f compile
sh print-cc.sh > compile
@@ -246,6 +251,15 @@ iopause.h: choose compile iopause.h1 iop
iopause.o: compile iopause.c iopause.h select.h tai.h taia.h uint64.h
./compile iopause.c
+loadhost:
+ rm -f loadhost
+ @echo > loadhost
+ @echo 'systype="`cat systype`"' >> loadhost
+ @echo 'cat warn-auto.sh' >> loadhost
+ @echo 'main="$$1"; shift' >> loadhost
+ @echo 'exec cc -o "$$main" "$$main".o $${1+"$$@"}' >> loadhost
+ chmod 555 loadhost
+
load: conf-ld print-ld.sh systype warn-auto.sh
rm -f load
sh print-ld.sh > load

40
srcpkgs/runit/template Normal file
View File

@ -0,0 +1,40 @@
# Template file for 'runit'
pkgname=runit
version=2.1.1
revision=1
wrksrc="admin"
short_desc="A UNIX init scheme with service supervision"
maintainer="Juan RP <xtraeme@gmail.com>"
license="BSD"
homepage="http://smarden.org/runit/"
distfiles="http://smarden.org/runit/runit-$version.tar.gz"
checksum=ffcf2d27b32f59ac14f2d4b0772a3eb80d9342685a2042b7fbbc472c07cf2a2c
do_build() {
cd ${pkgname}-${version}/src
echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
# set default service path to /var/service
sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
make ${makejobs}
}
do_install() {
cd ${pkgname}-${version}/src
# default services
vmkdir var
ln -s ../run/runit/runsvdir/current ${DESTDIR}/var/service
vmkdir usr/bin
install -m0755 {chpst,runit,runit-init,runsv,runsvchdir,runsvdir,sv,svlogd,utmpset} ${DESTDIR}/usr/bin
cd ..
vmkdir usr/share/man/man8
install -m0644 man/* ${DESTDIR}/usr/share/man/man8
vmkdir usr/share/doc/runit
install -m0644 doc/*.html ${DESTDIR}/usr/share/doc/runit
}