Tweak sysutils/ansible23 version 2.3.2.0
[dports.git] / net-mgmt / cacti / Makefile
1 # $FreeBSD$
2
3 PORTNAME=       cacti
4 PORTVERSION=    1.1.36
5 CATEGORIES=     net-mgmt www
6 MASTER_SITES=   http://www.cacti.net/downloads/ \
7                 ftp://ftpmirror.uk/freebsd-ports/cacti/
8
9 MAINTAINER=     freebsd-ports@dan.me.uk
10 COMMENT=        Web-driven graphing interface for RRDTool
11
12 LICENSE=        GPLv2+
13 LICENSE_FILE=   ${WRKSRC}/LICENSE
14
15 RUN_DEPENDS=    rrdtool:databases/rrdtool
16
17 USES=           cpe mysql php:web shebangfix
18 USE_PHP=        ctype filter gd gettext gmp hash json ldap mbstring openssl pcre pdo pdo_mysql posix session simplexml sockets snmp xml zlib
19 NO_ARCH=        yes
20 NO_BUILD=       yes
21 SUB_FILES=      pkg-message
22 SHEBANG_FILES=  scripts/3com_cable_modem.pl \
23                 scripts/diskfree.pl \
24                 scripts/linux_memory.pl \
25                 scripts/loadavg.pl \
26                 scripts/loadavg_multi.pl \
27                 scripts/ping.pl \
28                 scripts/query_unix_partitions.pl \
29                 scripts/unix_processes.pl \
30                 scripts/unix_tcp_connections.pl \
31                 scripts/unix_users.pl \
32                 scripts/weatherbug.pl \
33                 scripts/webhits.pl
34
35 CACTIDIR?=      share/cacti
36 CACTIUSER?=     cacti
37 CACTIGROUP?=    cacti
38
39 USERS?=         ${CACTIUSER}
40 GROUPS?=        ${CACTIGROUP}
41
42 PLIST_SUB+=     CACTIDIR=${CACTIDIR}  CACTIUSER=${CACTIUSER} \
43                 CACTIGROUP=${CACTIGROUP}
44 SUB_LIST+=      CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
45                 CACTIGROUP=${CACTIGROUP}
46
47 CONFLICTS_INSTALL=      cacti88
48
49 post-patch:
50         @${FIND} ${WRKSRC} -name \*.orig -delete; \
51         ${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.sample
52         ${RM} -r ${WRKSRC}/log ${WRKSRC}/rra
53
54 do-install:
55         ${MKDIR} ${STAGEDIR}/${PREFIX}/${CACTIDIR}
56         ${MKDIR} ${STAGEDIR}/var/log/cacti
57         ${MKDIR} ${STAGEDIR}/var/db/cacti/rra
58         ${MKDIR} ${STAGEDIR}/var/db/cacti/scripts
59         ${CP} -R ${WRKSRC}/* ${STAGEDIR}/${PREFIX}/${CACTIDIR}
60         if [ -f ${PREFIX}/${CACTIDIR}/include/db-settings.php ]; then \
61                 ${ECHO_CMD} "======================================================================="; \
62                 ${ECHO_CMD} "WARNING! You have to move DB settings from"; \
63                 ${ECHO_CMD} "${PREFIX}/${CACTIDIR}/include/db-settings.php file to"; \
64                 ${ECHO_CMD} "${PREFIX}/${CACTIDIR}/include/config.php and remove db-settings.php"; \
65         fi
66
67 .include <bsd.port.mk>