2014-02-11 02:37:56 +01:00
|
|
|
# Template file for 'runit'
|
|
|
|
pkgname=runit
|
2014-09-24 10:29:02 +02:00
|
|
|
version=2.1.2
|
2015-01-14 12:05:31 +01:00
|
|
|
revision=3
|
2014-02-11 02:37:56 +01:00
|
|
|
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"
|
2014-09-24 10:29:02 +02:00
|
|
|
checksum=6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18
|
2014-02-11 02:37:56 +01:00
|
|
|
|
2015-01-14 12:05:31 +01:00
|
|
|
build_options="static"
|
|
|
|
if [ "$build_option_static" ]; then
|
|
|
|
CFLAGS+=" -static"
|
|
|
|
LDFLAGS+=" -static"
|
|
|
|
fi
|
|
|
|
|
2014-02-11 02:37:56 +01:00
|
|
|
do_build() {
|
|
|
|
cd ${pkgname}-${version}/src
|
|
|
|
|
2014-04-27 01:56:38 +02:00
|
|
|
sed -e 's,sbin/runit,usr/bin/runit,g' -i runit.h
|
|
|
|
|
2014-02-11 02:37:56 +01:00
|
|
|
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
|
|
|
|
|
2014-07-22 18:05:21 +02:00
|
|
|
vinstall ${FILESDIR}/_sv 644 usr/share/zsh/site-functions
|
2014-02-11 02:37:56 +01:00
|
|
|
}
|