summaryrefslogtreecommitdiff
path: root/www/mod_watch4/Makefile
blob: d7be68fc0e18e6620418234f5bf05e32540116cf (plain) (blame)
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
# New ports collection makefile for:	mod_watch4
# Date created:			11 Octber 2003
# Whom:				Toshiya SAITOH <toshiya@saitoh.nu>
#
# $FreeBSD$
#

PORTNAME=	mod_watch
PORTVERSION=	4.3
CATEGORIES=	www
MASTER_SITES=	http://www.snert.com/Software/download/
DISTNAME=	${PORTNAME}${PORTVERSION:S/./0/g}
EXTRACT_SUFX=	.tgz
DIST_SUBDIR=	apache2

MAINTAINER=	toshiya@saitoh.nu
COMMENT=	An Apache2 module to monitor bandwidth usage, for use with MRTG etc

RUN_DEPENDS=	mrtg:${PORTSDIR}/net-mgmt/mrtg

NO_PACKAGE=	"Binary package distribution is prohibited by license"
NO_CDROM=	"Commercial distfile distribution is prohibited by license"

USE_PERL5_RUN=	yes
USE_APACHE=	yes
WITH_APACHE2=	yes

WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAKEFILE=	Makefile.dso

MAKE_ARGS+=	APXS="${APXS}"

ALL_TARGET=	build

DOCS=			apache2mrtg.shtml index.shtml mailto.js mod_watch.shtml style.css
DOCS_HTMLIMAGES=	apache-header-476-62.png mrpixel.gif mrtg-bar.png \
			sun-logo.jpg wave1.jpg

do-install:
	${APXS} -i -a -n watch ${WRKSRC}/mod_watch.la
	${INSTALL_SCRIPT} ${WRKSRC}/apache2mrtg.pl ${PREFIX}/sbin
	${INSTALL_SCRIPT} ${WRKSRC}/mod_watch.pl ${PREFIX}/sbin
	${INSTALL_SCRIPT} ${WRKSRC}/nfields.pl ${PREFIX}/sbin
.if !defined(NOPORTDOCS)
	@${INSTALL} -d -m 0755 ${DOCSDIR}/html/Img
	${INSTALL_DATA} ${WRKSRC}/CHANGES.TXT ${DOCSDIR}/
	${INSTALL_DATA} ${WRKSRC}/LICENSE.TXT ${DOCSDIR}/
.for f in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/html/
.endfor
.for f in ${DOCS_HTMLIMAGES}
	${INSTALL_DATA} ${WRKSRC}/Img/${f} ${DOCSDIR}/html/Img/
.endfor
.endif
	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>