mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
dbb402ee58
PR: 192618 Submitted by: Lars Engels <lars.engels@0x20.net>
78 lines
2.1 KiB
Makefile
78 lines
2.1 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= cacti
|
|
PORTVERSION= 0.8.8b${PATCHLEVEL}
|
|
PORTREVISION= 3
|
|
CATEGORIES= net-mgmt www
|
|
MASTER_SITES= http://www.cacti.net/downloads/
|
|
|
|
# Vendor's patches
|
|
PATCH_SITES= http://www.cacti.net/downloads/patches/${SITEDISTVERSION}/
|
|
PATCHFILES= security.patch
|
|
PATCH_DIST_STRIP= -p1
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Web-driven graphing interface for RRDTool
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
RUN_DEPENDS= rrdtool:${PORTSDIR}/databases/rrdtool
|
|
|
|
PATCH_STRIP= -p1
|
|
USES= shebangfix
|
|
USE_MYSQL= yes
|
|
USE_PHP= mysql pcre session sockets snmp xml
|
|
WANT_PHP_WEB= yes
|
|
NO_BUILD= yes
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
SUB_FILES= pkg-message
|
|
SHEBANG_FILES= scripts/3com_cable_modem.pl \
|
|
scripts/diskfree.pl \
|
|
scripts/linux_memory.pl \
|
|
scripts/loadavg.pl \
|
|
scripts/loadavg_multi.pl \
|
|
scripts/ping.pl \
|
|
scripts/query_unix_partitions.pl \
|
|
scripts/unix_processes.pl \
|
|
scripts/unix_tcp_connections.pl \
|
|
scripts/unix_users.pl \
|
|
scripts/weatherbug.pl \
|
|
scripts/webhits.pl
|
|
|
|
CACTIDIR?= share/cacti
|
|
CACTIUSER?= cacti
|
|
CACTIGROUP?= cacti
|
|
|
|
USERS?= ${CACTIUSER}
|
|
GROUPS?= ${CACTIGROUP}
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${SITEDISTVERSION}
|
|
|
|
SITEDISTVERSION= ${PORTVERSION:S/${PATCHLEVEL}$//}
|
|
|
|
PLIST_SUB+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
|
|
CACTIGROUP=${CACTIGROUP}
|
|
SUB_LIST+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
|
|
CACTIGROUP=${CACTIGROUP}
|
|
|
|
post-patch:
|
|
@${FIND} ${WRKSRC} -name \*.orig -delete; \
|
|
${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.sample
|
|
${RM} -r ${WRKSRC}/log ${WRKSRC}/rra
|
|
|
|
do-install:
|
|
${MKDIR} ${STAGEDIR}/${PREFIX}/${CACTIDIR}
|
|
${MKDIR} ${STAGEDIR}/var/log/cacti
|
|
${MKDIR} ${STAGEDIR}/var/db/cacti/rra
|
|
${MKDIR} ${STAGEDIR}/var/db/cacti/scripts
|
|
${CP} -R ${WRKSRC}/* ${STAGEDIR}/${PREFIX}/${CACTIDIR}
|
|
if [ -f ${PREFIX}/${CACTIDIR}/include/db-settings.php ]; then \
|
|
${ECHO_CMD} "======================================================================="; \
|
|
${ECHO_CMD} "WARNING! You have to move DB settings from"; \
|
|
${ECHO_CMD} "${PREFIX}/${CACTIDIR}/include/db-settings.php file to"; \
|
|
${ECHO_CMD} "${PREFIX}/${CACTIDIR}/include/config.php and remove db-settings.php"; \
|
|
fi
|
|
|
|
.include <bsd.port.mk>
|