diff options
author | tez <tez> | 2011-11-22 22:23:13 +0000 |
---|---|---|
committer | tez <tez> | 2011-11-22 22:23:13 +0000 |
commit | 33ae668a641280b8b756ce94ed401f020ab4cfc5 (patch) | |
tree | 757688bfa4b7c1c71b3b9209004b569722145cc8 /net/cacti/Makefile | |
parent | a623a0acf3018468f3fd13be96a380d2359b67cc (diff) | |
download | pkgsrc-33ae668a641280b8b756ce94ed401f020ab4cfc5.tar.gz |
Cacti is a complete frontend to rrdtool, it stores all of the necessary
information to create graphs and populates them with data in a MySQL
database. The frontend is completely PHP driven. Along with being able
to maintain Graphs, Data Sources, and Round Robin Archives in a
database, cacti handles the data gathering also. There is also SNMP
support for those used to creating traffic graphs with MRTG.
The Plugin Architecture for Cacti was designed to be both simple in nature
and robust enough to allow freedom to do almost anything in Cacti. The
Plugin Architecture for Cacti is integrated into this package.
(created from wip/cacti by pettai)
Diffstat (limited to 'net/cacti/Makefile')
-rw-r--r-- | net/cacti/Makefile | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/net/cacti/Makefile b/net/cacti/Makefile new file mode 100644 index 00000000000..8f1c49693be --- /dev/null +++ b/net/cacti/Makefile @@ -0,0 +1,94 @@ +# $NetBSD: Makefile,v 1.1.1.1 2011/11/22 22:23:13 tez Exp $ +# + +DISTNAME= cacti-0.8.7h +CATEGORIES= net +DISTFILES= cacti-0.8.7h.tar.gz +DISTFILES+= cacti-plugin-0.8.7h-PA-v3.0.tar.gz +MASTER_SITES= http://www.cacti.net/downloads/ +MASTER_SITES+= http://www.cacti.net/downloads/pia/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.cacti.net/ +COMMENT= Frontend to rrdtool for monitoring systems and services +LICENSE= gnu-gpl-v2 + +USE_LANGUAGES= # none +USE_TOOLS+= pax +NO_BUILD= yes +PKG_DESTDIR_SUPPORT= user-destdir + +DEPENDS+= ${PHP_PKG_PREFIX}-mysql-[0-9]*:../../databases/php-mysql +DEPENDS+= ${PHP_PKG_PREFIX}-snmp-[0-9]*:../../net/php-snmp/ +DEPENDS+= ${PHP_PKG_PREFIX}-sockets-[0-9]*:../../net/php-sockets/ +DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}-[0-9]*:../../www/ap-php/ + +.include "../../mk/bsd.prefs.mk" +.include "../../lang/php/phpversion.mk" +.include "../../mk/apache.mk" + +PKG_USERS= ${CACTI_USER}:${CACTI_GROUP} +PKG_GROUPS= ${CACTI_GROUP} +PKG_GECOS.${CACTI_USER}= Cacti user +PKG_HOME.${CACTI_USER}= ${CACTIDIR} +PKG_SHELL.${CACTI_USER}= ${SH} +PKG_USERS_VARS+= CACTI_USER +PKG_GROUPS_VARS+= CACTI_GROUP + +BUILD_DEFS+= PKG_SYSCONFBASE +PKG_SYSCONFSUBDIR?= httpd +EGDIR= ${PREFIX}/share/examples/cacti +CONF_FILES+= ${EGDIR}/httpd-cacti.conf ${PKG_SYSCONFDIR}/httpd-cacti.conf +CACTIDIR= ${PREFIX}/share/cacti +CACTI_LOGDIR?= ${CACTIDIR}/log +CACTI_RRADIR?= ${CACTIDIR}/rra + +REPLACE_INTERPRETER+= php +REPLACE.php.old= .*php[^ ]* +REPLACE.php.new= ${PREFIX}/bin/php +REPLACE_FILES.php= cli/*.php + +MESSAGE_SUBST+= CACTIDIR=${CACTIDIR} +MESSAGE_SUBST+= CACTI_LOGDIR=${CACTI_LOGDIR} +MESSAGE_SUBST+= CACTI_USER=${CACTI_USER} +MESSAGE_SUBST+= EGDIR=${EGDIR} +MESSAGE_SUBST+= PREFIX=${PREFIX} +MESSAGE_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE} +FILES_SUBST+= CACTIDIR=${CACTIDIR} + +SUBST_CLASSES+= paths +SUBST_STAGE.paths= pre-configure +SUBST_FILES.paths= ${WRKDIR}/httpd-cacti.conf install/index.php +SUBST_FILES.paths+= include/global.php include/global_settings.php +SUBST_VARS.paths= CACTIDIR PREFIX CACTI_USER CACTI_LOGDIR CACTI_RRADIR +SUBST_VARS.paths+= PKG_PHP_MAJOR_VERS + +SUBST_CLASSES+= docs +SUBST_STAGE.docs= pre-configure +SUBST_FILES.docs= docs/txt/manual.txt docs/html/*.html +SUBST_SED.docs= -e 's,/var/www/html/cacti,${CACTIDIR},g' + +OWN_DIRS_PERMS+= ${CACTI_LOGDIR} ${CACTI_USER} ${CACTI_GROUP} 755 +OWN_DIRS_PERMS+= ${CACTI_RRADIR} ${CACTI_USER} ${CACTI_GROUP} 755 +SPECIAL_PERMS+= share/cacti/log/cacti.log ${CACTI_USER} ${CACTI_GROUP} 755 + +INSTALLATION_DIRS= share/examples/cacti +INSTALLATION_DIRS+= share/cacti + +pre-patch: + ${CP} -R ${WRKDIR}/cacti-plugin-arch/files/* ${WRKDIR} + +post-extract: + ${CP} ${FILESDIR}/httpd-cacti.conf ${WRKDIR}/ + ${CP} ${FILESDIR}/freebsd_memory.pl ${WRKSRC}/scripts/ + ${CP} ${FILESDIR}/netbsd_memory.pl ${WRKSRC}/scripts/ + ${CP} ${FILESDIR}/solaris_memory.pl ${WRKSRC}/scripts/ + +do-install: + ${INSTALL_DATA} ${WRKDIR}/httpd-cacti.conf ${DESTDIR}${EGDIR}/httpd-cacti.conf + ${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} -f {} \; + cd ${WRKSRC} && ${PAX} -wr * ${DESTDIR}${CACTIDIR} + + +.include "../../databases/rrdtool/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" |