blob: 5c513b03ab2964d72232c08fb730519b2aa39261 (
plain) (
blame)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
PORTNAME= s6-frontend
DISTVERSION= 0.0.1.1
CATEGORIES= sysutils
MASTER_SITES= http://www.skarnet.org/software/${PORTNAME}/
MAINTAINER= crest@rlwinm.de
COMMENT= Frontend to the s6 init system
WWW= https://www.skarnet.org/software/s6-frontend/
LICENSE= ISCL
LICENSE_FILE= ${WRKSRC}/COPYING
FLAVORS= hier run
FLAVOR?= ${FLAVORS:[1]}
BUILD_DEPENDS= execline>=2.9.8.1:lang/execline \
skalibs>=2.14.5.1:devel/skalibs \
s6>=2.14.0.1:sysutils/s6 \
s6-rc${PKGNAMESUFFIX}>=0.6.0.0:sysutils/s6-rc@${FLAVOR}
RUN_DEPENDS= execline>=2.9.8.1:lang/execline \
skalibs>=2.14.5.1:devel/skalibs \
s6>=2.14.0.1:sysutils/s6 \
s6-rc${PKGNAMESUFFIX}>=0.6.0.0:sysutils/s6-rc@${FLAVOR}
LIB_DEPENDS= libs6.so:sysutils/s6 \
libskarnet.so:devel/skalibs
USES= gmake
USE_LDCONFIG= yes
HAS_CONFIGURE= yes
run_PKGNAMESUFFIX= -run
# The only difference between the hier and the run flavors is the default live directory path
# hard coded into the s6-rc utilities allowing their use without passing -l <live_dir>.
# A FreeBSD port should follow the operating system file system layout, but there is a corner
# case where s6-rc replacing base system init system *has* to deviate from hier(7).
# The problem is that s6-rc requires a writeable file system
# (to track service state, bind unix sockets, create named fifos)
# very early in the boot process before FreeBSD used to mount /var and /var/run.
# One way to satisfy this requirement is to mount a tmpfs directly under /.
# The live directory shouldn't be kept on /tmp because this often a small
# file system that could be exhausted by accident breaking s6-rc.
# Adding a small /run tmpfs dedicated to s6-rc solves this problem.
.if ${FLAVOR} == run # Follow hier(7)
LIVEDIR?= /run/${PORTNAME}
SCANDIR?= /run/service
STMPDIR?= /run/s6-frontend
.endif
LIVEDIR?= /var/run/${PORTNAME}
SCANDIR?= /var/run/service
STMPDIR?= /var/run/s6-frontend
CFLAGS+= -D__BSD_VISIBLE
CONFIGURE_ARGS+=--prefix=${PREFIX} \
--with-include=${LOCALBASE}/include \
--with-lib=${LOCALBASE}/lib \
--with-lib=${LOCALBASE}/lib/execline \
--with-lib=${LOCALBASE}/lib/s6 \
--with-dynlib=${LOCALBASE}/lib \
--disable-s6li \
--livedir=${LIVEDIR} \
--scandir=${SCANDIR} \
--enable-shared
DOCS= AUTHORS COPYING INSTALL README doc/*.html
OPTIONS_DEFINE= DOCS
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
|