aboutsummaryrefslogtreecommitdiffstats
path: root/net/cacti/Makefile
blob: 8aa1a8563dc0542c3f597c635e36a9233bbe133d (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
# New ports collection makefile for:    cacti
# Date created:     6 December 2003
# Whom:         Vincent Tantardini <vinc@freebsd-fr.org>
#
# $FreeBSD$
#

PORTNAME=   cacti
PORTVERSION=    0.8.4
CATEGORIES= net
MASTER_SITES=   http://www.raxnet.net/downloads/

MAINTAINER= vinc@freebsd-fr.org
COMMENT=    Web-driven graphing interface for RRDTool

RUN_DEPENDS=    php:${PORTSDIR}/lang/php4 \
        rrdtool:${PORTSDIR}/net/rrdtool \
        net-snmp-config:${PORTSDIR}/net/net-snmp

USE_MYSQL=  yes
NO_BUILD=   yes
PKGMESSAGE= ${WRKDIR}/pkg-message

CACTIDIR?=  share/cacti
CACTIUSER?= cacti
CACTIGROUP?=    ${CACTIUSER}
PLIST_SUB+= CACTIDIR=${CACTIDIR}

post-patch:
    @${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}| ; \
        s|%%CACTIDIR%%|${CACTIDIR}| ; \
        s|%%CACTIUSER%%|${CACTIUSER}|' > ${PKGMESSAGE}

pre-install:
    @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
        ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

do-install:
    @${MKDIR} ${PREFIX}/${CACTIDIR}/
    @${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/

post-install:
    @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
        ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>