summaryrefslogtreecommitdiff
path: root/net/smokeping/Makefile
blob: 943d8ab77aeff6d85398d38fd2286d26af95a15a (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
# $NetBSD: Makefile,v 1.3 2003/07/21 17:11:16 martti Exp $

DISTNAME=	smokeping-1.19
CATEGORIES=	net
MASTER_SITES=	http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/

MAINTAINER=	bouyer@NetBSD.org
HOMEPAGE=	http://people.ee.ethz.ch/~oetiker/webtools/smokeping/index.en.html
COMMENT=	Latency/packet loss monitoring/graphing tool

DEPENDS=	rrdtool-1*:../../databases/rrdtool
DEPENDS+=	fping>=2.4b2:../../net/fping
DEPENDS+=	p5-Digest-MD5>=2.20:../../security/p5-Digest-MD5
DEPENDS+=	p5-libwww>=5.64:../../www/p5-libwww

USE_PERL5=	YES
PERL5_REQD=	5.6.0
USE_PKGINSTALL=	yes

PKG_SYSCONFSUBDIR?=     smokeping
MESSAGE_SUBST+=         PKG_SYSCONFDIR=${PKG_SYSCONFDIR}

EGDIR=${PREFIX}/share/examples/smokeping
CONF_FILES= ${EGDIR}/basepage.html.dist ${PKG_SYSCONFDIR}/basepage.html
CONF_FILES+= ${EGDIR}/smokemail.dist ${PKG_SYSCONFDIR}/smokemail
RCD_SCRIPTS=	smokeping

.include "../../mk/bsd.prefs.mk"
.if defined(USE_INET6) && ${USE_INET6} == "YES"
DEPENDS+=	p5-Socket6-*:../../net/p5-Socket6
.endif

do-build:
	${SED} -e s#@PREFIX@#${PREFIX}#g \
	     -e s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g \
	     <${WRKSRC}/bin/smokeping.dist >${WRKDIR}/smokeping.pl
	${SED} -e s#@PREFIX@#${PREFIX}#g \
	     -e s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g \
	    <${WRKSRC}/htdocs/smokeping.cgi.dist >${WRKDIR}/smokeping.cgi
	${SED} -e s#@PREFIX@#${PREFIX}#g \
	     -e s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g \
	    <${WRKSRC}/etc/config.dist >${WRKDIR}/config.dist

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/lib/smokeping
	${INSTALL_DATA_DIR} ${PREFIX}/lib/smokeping/ISG
	${INSTALL_DATA_DIR} ${PREFIX}/lib/smokeping/probes
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/smokeping
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/smokeping
	for FILE in CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO; do \
	  ${INSTALL_DATA} ${WRKSRC}/$$FILE ${PREFIX}/share/doc/smokeping; \
	done
	for FILE in ${WRKSRC}/doc/*.txt; do \
	  ${INSTALL_DATA} $$FILE ${PREFIX}/share/doc/smokeping; \
	done
	${INSTALL_SCRIPT} ${WRKDIR}/smokeping.pl ${PREFIX}/bin/smokeping
	${INSTALL_SCRIPT} ${WRKDIR}/smokeping.cgi ${PREFIX}/libexec/cgi-bin/
	for FILE in ${WRKSRC}/lib/*.pm; do \
	  ${INSTALL_DATA} $$FILE ${PREFIX}/lib/smokeping; \
	done
	for FILE in ${WRKSRC}/lib/ISG/*.pm; do \
	  ${INSTALL_DATA} $$FILE ${PREFIX}/lib/smokeping/ISG; \
	done
	for FILE in ${WRKSRC}/lib/probes/*.pm; do \
	  ${INSTALL_DATA} $$FILE ${PREFIX}/lib/smokeping/probes; \
	done
	for FILE in ${WRKDIR}/config.dist \
	    ${WRKSRC}/etc/basepage.html.dist \
	    ${WRKSRC}/etc/config-echoping.dist \
	    ${WRKSRC}/etc/smokemail.dist; do \
	  ${INSTALL_DATA} $$FILE ${PREFIX}/share/examples/smokeping; \
	done

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