python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / runit / template
blob8fcf765e87e542bd97fd66874878bc89d338fe4e
1 # Template file for 'runit'
2 pkgname=runit
3 version=2.1.2
4 revision=9
5 wrksrc="admin"
6 short_desc="A UNIX init scheme with service supervision"
7 maintainer="Juan RP <xtraeme@voidlinux.eu>"
8 license="3-clause-BSD"
9 homepage="http://smarden.org/runit/"
10 distfiles="http://smarden.org/runit/runit-$version.tar.gz"
11 checksum=6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18
13 build_options="static"
15 do_build() {
16         cd ${pkgname}-${version}/src
18         if [ "$build_option_static" ]; then
19                 CFLAGS+=" -static"
20                 LDFLAGS+=" -static"
21         fi
23         sed -e 's,sbin/runit,usr/bin/runit,g' -i runit.h
25         echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
26         echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
27         # set default service path to /var/service
28         sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
29         # change type short to gid_t for getgroups(2) and setgroups(2)
30         sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
32         make ${makejobs}
35 do_install() {
36         vlicense ${pkgname}-${version}/package/COPYING
38         cd ${pkgname}-${version}/src
40         # default services
41         vmkdir var
42         ln -s ../run/runit/runsvdir/current ${DESTDIR}/var/service
44         local f
45         for f in chpst runit runit-init runsv runsvchdir runsvdir \
46                 sv svlogd utmpset; do
47                 vbin $f
48         done
50         cd ..
51         for f in man/*; do
52                 vman $f
53         done
55         vinstall ${FILESDIR}/_sv 644 usr/share/zsh/site-functions
56         vinstall ${FILESDIR}/sv  644 usr/share/bash-completion/completions