1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00
freebsd-ports/net/cacti/Makefile
Sergey Matveychuk 2ff7a5ddb8 - Add two vendor's patches which fix poller working with php4.
Submitted by:	Vaclav Hala <hala_at_kraj-jihocesky.cz>
2007-01-31 18:09:16 +00:00

71 lines
1.9 KiB
Makefile

# New ports collection makefile for: cacti
# Date created: 6 December 2003
# Whom: Vincent Tantardini <vinc@freebsd-fr.org>
#
# $FreeBSD$
#
PORTNAME= cacti
PORTVERSION= 0.8.6j${PATCHLEVEL}
PORTREVISION= 0
CATEGORIES= net www
MASTER_SITES= http://www.cacti.net/downloads/
DISTNAME= ${PORTNAME}-${SITEDISTVERSION}
MAINTAINER= sem@FreeBSD.org
COMMENT= Web-driven graphing interface for RRDTool
# Vendor's patches
PATCH_SITES= http://www.cacti.net/downloads/patches/${SITEDISTVERSION}/
PATCHFILES= ping_php_version4_snmpgetnext.patch \
tree_console_missing_hosts.patch
PATCHLEVEL= .2
SITEDISTVERSION= ${PORTVERSION:S/${PATCHLEVEL}$//}
PATCH_DIST_STRIP=-p1
RUN_DEPENDS= rrdtool:${PORTSDIR}/net/rrdtool
USE_MYSQL= yes
USE_PHP= mysql pcre session snmp xml
WANT_PHP_WEB= yes
NO_BUILD= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGINSTALL= ${WRKDIR}/pkg-install
SUB_FILES= pkg-message pkg-install
CACTIDIR?= share/cacti
CACTIUSER?= cacti
CACTIGROUP?= ${CACTIUSER}
PLIST_SUB+= CACTIDIR=${CACTIDIR}
SUB_LIST+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
CACTIGROUP=${CACTIGROUP}
.include <bsd.port.pre.mk>
post-patch:
@${FIND} ${WRKSRC} -name \*.orig -delete; \
${MV} ${WRKSRC}/include/db-settings.php ${WRKSRC}/include/db-settings.php.orig
${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.orig
pre-install:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
do-install:
@${MKDIR} ${PREFIX}/${CACTIDIR}; \
${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/; \
if [ ! -f ${PREFIX}/${CACTIDIR}/include/db-settings.php ]; then \
${CP} ${PREFIX}/${CACTIDIR}/include/db-settings.php.orig \
${PREFIX}/${CACTIDIR}/include/db-settings.php; \
fi
@if [ ! -f ${PREFIX}/${CACTIDIR}/include/config.php ]; then \
${CP} ${PREFIX}/${CACTIDIR}/include/config.php.orig \
${PREFIX}/${CACTIDIR}/include/config.php; \
fi
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>