summaryrefslogtreecommitdiff
path: root/sysutils/safetynet/Makefile
blob: 4f5a3b488a6e669949976c1a6ff35355c37f2bef (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
# $NetBSD: Makefile,v 1.10 2011/03/18 20:56:29 zafer Exp $
#

DISTNAME=	safetynet-1.15
CATEGORIES=	sysutils
MASTER_SITES=	# http://www.unixpimps.org/safetynet/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.unixpimps.org/safetynet/
COMMENT=	Safetynet is a perl script intended to monitor system services

PKG_DESTDIR_SUPPORT=	user-destdir

WRKSRC=		${WRKDIR}
NO_BUILD=	YES
USE_TOOLS+=	perl:run

INSTALLATION_DIRS=	bin etc share/doc/safetynet

post-patch:
	${SED}	-e "s,/etc/safetynet.conf,${PREFIX}/etc/safetynet.conf,g" \
		-e "s,/bin/mail,/usr/bin/mail,g"			\
		-e "s,ps -Af,ps ax,g"					\
		-e "s,/usr/bin/perl,${LOCALBASE}/bin/perl,g"		\
		${WRKSRC}/safetynet > ${WRKSRC}/safetynet.done
	${MV} -f ${WRKSRC}/safetynet.done ${WRKSRC}/safetynet
	${SED}	-e "s,/usr/local/apache/bin/apachectl,${LOCALBASE}/sbin/apachectl,g" \
		-e "s,/usr/local,${PREFIX},g"				\
		${WRKSRC}/safetynet.conf > ${WRKSRC}/safetynet.conf.done
	${MV} ${WRKSRC}/safetynet.conf.done ${WRKSRC}/safetynet.conf

do-install:
	${INSTALL_SCRIPT} -m 700 ${WRKSRC}/safetynet ${DESTDIR}${PREFIX}/bin/safetynet
	${INSTALL_DATA} -m 600 ${WRKSRC}/safetynet.conf ${DESTDIR}${PREFIX}/etc/safetynet.conf.sample
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/safetynet/README

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