summaryrefslogtreecommitdiff
path: root/sysutils/daemontools/Makefile
blob: a7ee48d8c9911eab6fa081926d45d7b1e85f3dc3 (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
# $NetBSD: Makefile,v 1.4 2001/03/06 16:16:46 hubertf Exp $
# FreeBSD Id: ports/sysutils/daemontools/Makefile,v 1.8 2000/12/03 05:16:41 steve Exp

DISTNAME=	daemontools-0.70
CATEGORIES=	sysutils
MASTER_SITES=	http://cr.yp.to/daemontools/				\
		ftp://cr.yp.to/daemontools/				\
		ftp://ftp.innominate.org/gpa/djb/			\
		http://zuntum.eik.pl/pkgsrc/distfiles/
DISTFILES=	${DISTNAME}.tar.gz					\
		${DISTNAME}-man.tar.gz

MAINTAINER=	zuntum@eik.pl
HOMEPAGE=	http://cr.yp.to/daemontools.html
COMMENT=	Service monitoring and logging utilities by djb

RESTRICTED=	"Redistribution of modified package is forbidden"
NO_BIN_ON_CDROM=${RESTRICTED}
NO_BIN_ON_FTP=	${RESTRICTED}

ALL_TARGET=	it
INSTALL_TARGET=	setup check
SAMPLERC=	svscan.sh.sample
SERVICEDIR?=	/var/spool/service

PLIST_SUBST+=	SERVICEDIR=${SERVICEDIR}
DEINSTALL_FILE=	${WRKDIR}/.DEINSTALL

post-patch:
	@${ECHO} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
	@${ECHO} "${CC} -s" > ${WRKSRC}/conf-ld
	@${ECHO} "${PREFIX}" > ${WRKSRC}/conf-home

post-build:
	@${SED} \
		-e "s!/usr/local/!${PREFIX}/!" \
		-e "s!/service!${SERVICEDIR}!g" \
		${FILESDIR}/${SAMPLERC} > ${WRKDIR}/${SAMPLERC}
	@${SED} \
		-e "s!/service!${SERVICEDIR}!g" \
		${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}

post-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/daemontools
	${INSTALL_DATA} ${WRKDIR}/${SAMPLERC} ${PREFIX}/share/examples/daemontools
	${INSTALL_DATA_DIR} ${SERVICEDIR}

	cd ${WRKDIR}/${DISTNAME}-man && ${INSTALL_MAN} envdir.8 envuidgid.8	\
		fghack.8 multilog.8 setlock.8 setuidgid.8 softlimit.8		\
		supervise.8 svc.8 svok.8 svscan.8 svstat.8 tai64n.8		\
		tai64nlocal.8 ${PREFIX}/man/man8

.include "../../mk/bsd.pkg.mk"