forked from void-linux/void-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate
More file actions
55 lines (46 loc) · 1.46 KB
/
template
File metadata and controls
55 lines (46 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Template file for 'runit'
pkgname=runit
version=2.1.2
revision=15
build_wrksrc="${pkgname}-${version}/src"
build_style="gnu-makefile"
short_desc="UNIX init scheme with service supervision"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://smarden.org/runit/"
distfiles="http://smarden.org/runit/runit-$version.tar.gz"
checksum=6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18
patch_args=-Np0
# FIXME: this is caused by some bonk tests that should be fixed in void-linux/runit at some point
make_check=no
build_options="static"
if [ "$build_option_static" ]; then
CFLAGS="-static"
LDFLAGS="-static"
fi
pre_build() {
sed -e 's,sbin/runit,usr/bin/runit,g' -i runit.h
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
# change type short to gid_t for getgroups(2) and setgroups(2)
sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
}
do_install() {
vlicense ../package/COPYING
# default services
vmkdir var
ln -s ../run/runit/runsvdir/current ${DESTDIR}/var/service
local f
for f in chpst runit runit-init runsv runsvchdir runsvdir \
sv svlogd utmpset; do
vbin $f
done
cd ..
for f in man/*; do
vman $f
done
vinstall ${FILESDIR}/_sv 644 usr/share/zsh/site-functions
vinstall ${FILESDIR}/sv 644 usr/share/bash-completion/completions
}