blob: cd826a43d43a9705737b9266f811a9fb8169589a (
plain)
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
74
75
76
|
# New ports collection makefile for: daemontools
# Date created: 09 June 1998
# Whom: Dom Mitchell <dom@myrddin.demon.co.uk>
#
# $FreeBSD$
#
PORTNAME= daemontools
PORTVERSION= 0.76
PORTREVISION= 11
CATEGORIES= sysutils
MASTER_SITES= http://cr.yp.to/daemontools/ \
ftp://cr.yp.to/daemontools/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= roam@FreeBSD.org
COMMENT= Service monitoring and logging utilities by djb
.if !defined(WITHOUT_MAN)
MANDATE= -20010714
MASTER_SITES+= http://smarden.org/pape/djb/manpages/:1
DISTFILES+= ${DISTNAME}-man${MANDATE}.tar.gz:1
MAN8= envdir.8 envuidgid.8 fghack.8 multilog.8 pgrphack.8 \
readproctitle.8 setlock.8 setuidgid.8 softlimit.8 \
supervise.8 svc.8 svok.8 svscan.8 svscanboot.8 svstat.8 \
tai64n.8 tai64nlocal.8
MANCOMPRESSED= no
.endif
USE_RC_SUBR= yes
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} SERVICEDIR=${SERVICEDIR}
WRKSRC= ${WRKDIR}/admin/${DISTNAME}/src
NO_PACKAGE= "Unsure of djb\'s license"
ALL_TARGET= it
INSTALL_TARGET= setup check
SAMPLERC= svscan.sh.sample
SERVICEDIR?= /var/service
STARTUP_SCRIPT?= ${SAMPLERC:S/.sample//}
PLIST_SUB+= STARTUP_SCRIPT="${STARTUP_SCRIPT}"
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 500023 || ${OSVERSION} < 500000 && ${OSVERSION} >= 460102
RC_SCRIPTS_SUB+= DAEMON="/usr/sbin/daemon -f"
.else
RC_SCRIPTS_SUB+= DAEMON=""
.endif
post-patch:
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} ${STRIP}" > ${WRKSRC}/conf-ld
post-build:
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/${SAMPLERC} > ${WRKDIR}/${SAMPLERC}
do-install:
(while read cmd; do \
if ${FILE} ${WRKSRC}/$$cmd | ${GREP} -q "shell script"; then \
${INSTALL_SCRIPT} ${WRKSRC}/$$cmd ${PREFIX}/bin; \
else \
${INSTALL_PROGRAM} ${WRKSRC}/$$cmd ${PREFIX}/bin; \
fi \
done) < ${WRKSRC}/../package/commands
post-install:
@${INSTALL_SCRIPT} ${WRKDIR}/${SAMPLERC} ${PREFIX}/etc/rc.d/${STARTUP_SCRIPT}
.if !defined(WITHOUT_MAN)
@${INSTALL_MAN} ${WRKDIR}/daemontools-man/*.8 ${PREFIX}/man/man8/
.endif
.include <bsd.port.post.mk>
|