summaryrefslogtreecommitdiff
path: root/sysutils/daemontools/Makefile
blob: df90aafe5b0068b16054c0f96f7b93ef6cbd24ee (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
# $NetBSD: Makefile,v 1.43 2020/05/23 21:32:15 schmonz Exp $

DISTNAME=		daemontools-0.76
PKGREVISION=		3
CATEGORIES=		sysutils
MASTER_SITES=		http://cr.yp.to/daemontools/ ftp://cr.yp.to/daemontools/
DISTFILES=		${DISTNAME}${EXTRACT_SUFX} ${MANPAGES}

MAINTAINER=		schmonz@NetBSD.org
HOMEPAGE=		https://cr.yp.to/daemontools.html
COMMENT=		Service monitoring and logging utilities by djb
LICENSE=		public-domain

MANPAGES=		${DISTNAME}-man-20020131.tar.gz
SITES.${MANPAGES}=	http://smarden.org/pape/djb/manpages/

CONFLICTS+=		daemontools-encore-[0-9]*

DJB_RESTRICTED=		no
DJB_ERRNO_HACK=		no

WRKSRC=			${WRKDIR}/admin/${PKGNAME_NOREV}
DJB_SLASHPACKAGE=	YES

CMDDIR=			${WRKSRC}/command

USE_TOOLS+=		file

INSTALLATION_DIRS=	bin man ${PKGMANDIR}/man8

SUBST_FILES.djbware+=	src/error.h

SUBST_CLASSES+=		paths
SUBST_STAGE.paths=	do-configure
SUBST_FILES.paths=	src/svscanboot.sh
SUBST_SED.paths=	-e 's|/usr/local/sbin:/bin|/usr/local/sbin:${PREFIX}/bin:${PREFIX}/sbin:/bin|g'
SUBST_SED.paths+=	-e 's|/command/svc |${PREFIX}/bin/svc |g'

MAKE_ENV+=		PKGSRC_SHELL=${TOOLS_PLATFORM.sh}

.include "options.mk"

do-install:
	(while read cmd; do \
	  if ${FILE_CMD} ${CMDDIR}/$$cmd | ${EGREP} "(executable .* script|shell script|text)" >/dev/null 2>&1; then \
	    ${INSTALL_SCRIPT} ${CMDDIR}/$$cmd ${DESTDIR}${PREFIX}/bin; \
	  else \
	    ${INSTALL_PROGRAM} ${CMDDIR}/$$cmd ${DESTDIR}${PREFIX}/bin; \
	  fi \
	done) < ${WRKSRC}/package/commands
	cd ${WRKDIR}/*-man; for i in 8; do		 		\
	for j in *.$$i; do ${INSTALL_MAN} $$j ${DESTDIR}${PREFIX}/${PKGMANDIR}/man$$i; done \
	done

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