blob: 98f5d634916d4067d7a96a9a555ad176289d0ef6 (
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
75
76
|
# New ports collection makefile for: drraw
# Date created: 2006-08-08
# Whom: Jim Riggs <ports@christianserving.org>
#
# $FreeBSD$
#
PORTNAME= drraw
DISTVERSION= 2.2b2
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://web.taranis.org/drraw/dist/ \
http://christianserving.org/ports/mail/imapsync/
MAINTAINER= avg@icyb.net.ua
COMMENT= A simple web-based presentation front-end for RRDtool
RUN_DEPENDS+= rrdtool>=0:${PORTSDIR}/databases/rrdtool
OPTIONS= ZOOM_PATCH "Zoom support using jQuery via external patch" off
USE_PERL5_RUN= yes
NO_BUILD= yes
PORTDOCS= CHANGES INSTALL LICENSE README.EVENTS
CONFDIR?= etc
DATADIRS?= "/var/db/rrdtool" => "[Label1] "
SAVEDDIR?= /var/db/${PORTNAME}/saved
TMPDIR?= /var/db/${PORTNAME}/tmp
PLIST_SUB+= CONFDIR=${CONFDIR}
.include <bsd.port.pre.mk>
.if defined(WITH_ZOOM_PATCH)
PATCH_SITES+= http://aprilmayjune.org/wp-content/uploads/2009/09/
PATCHFILES+= drraw.cgi.zoom_patch
.endif
post-patch:
@${REINPLACE_CMD} -e 's|%%CONFDIR%%|${PREFIX}/${CONFDIR}|g' ${WRKSRC}/drraw.cgi
@${CP} -p ${WRKSRC}/drraw.conf ${WRKSRC}/drraw.conf-dist
@${REINPLACE_CMD} \
-e 's|%%DATADIRS%%|${DATADIRS}|g' \
-e 's|%%SAVEDDIR%%|${SAVEDDIR}|g' \
-e 's|%%TMPDIR%%|${TMPDIR}|g' \
${WRKSRC}/drraw.conf-dist
do-install:
${INSTALL_DATA} ${WRKSRC}/drraw.conf-dist ${PREFIX}/${CONFDIR}
${MKDIR} ${WWWDIR}
${INSTALL_SCRIPT} ${WRKSRC}/drraw.cgi ${WWWDIR}
${MKDIR} ${WWWDIR}/icons
.for theFile in bomb.gif folder.gif folder.open.gif generic.gif link.gif text.gif unknown.gif
${INSTALL_DATA} ${WRKSRC}/icons/${theFile} ${WWWDIR}/icons
.endfor
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
. for theFile in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${theFile} ${DOCSDIR}
. endfor
.endif
post-install:
@if [ ! -f ${PREFIX}/etc/drraw.conf ];\
then \
${CP} -p ${PREFIX}/etc/drraw.conf-dist ${PREFIX}/etc/drraw.conf; \
fi
.include <bsd.port.post.mk>
|