diff --git a/net-mgmt/nfsen/Makefile b/net-mgmt/nfsen/Makefile index bbd783c50e07..ed5e67860154 100644 --- a/net-mgmt/nfsen/Makefile +++ b/net-mgmt/nfsen/Makefile @@ -23,7 +23,6 @@ USES= iconv shebangfix perl5 USE_PHP= session pcre sockets NO_BUILD= yes PLIST_SUB+= PORTNAME=${PORTNAME} -SUB_FILES= pkg-install USE_RC_SUBR= nfsen perl_OLD_CMD= %%PERL%% SHEBANG_FILES= bin/testPlugin bin/RebuildHierarchy.pl bin/nfsen bin/nfsend libexec/NfSenRRD.pm \ @@ -39,7 +38,6 @@ SUB_LIST+= "PREFIX=${PREFIX}" SUB_LIST+= "WWWDIR=${WWWDIR}" SUB_LIST+= "PORTNAME=${PORTNAME}" -NO_STAGE= yes post-patch: .for nfsenfile in ${REINPLACE_LIST} @${REINPLACE_CMD} ${_SUB_LIST_TEMP} ${WRKSRC}/${nfsenfile} @@ -47,27 +45,27 @@ post-patch: .for perlfile in ${SHEBANG_FILES} @${REINPLACE_CMD} "s|perl -w$$|perl|" ${WRKSRC}/${perlfile} .endfor + ${CP} ${FILESDIR}/conf.php ${WRKSRC} + @${REINPLACE_CMD} ${_SUB_LIST_TEMP} ${WRKSRC}/conf.php do-install: - ${INSTALL} -d ${PREFIX}/var/${PORTNAME}/profiles-data/live - ${INSTALL} -d ${PREFIX}/var/${PORTNAME}/profiles-stat/live - ${INSTALL} -d ${PREFIX}/var/${PORTNAME}/profiles/live - ${INSTALL} -d ${PREFIX}/var/${PORTNAME}/filters - ${INSTALL} -d ${PREFIX}/var/${PORTNAME}/run - ${INSTALL} -d ${PREFIX}/libexec/${PORTNAME}/plugins - ${INSTALL} -d ${WWWDIR}/plugins - (cd ${WRKSRC}/bin && ${INSTALL_SCRIPT} * ${PREFIX}/bin/) - ${INSTALL_DATA} ${WRKSRC}/etc/nfsen-dist.conf ${PREFIX}/etc/ - (cd ${WRKSRC}/html && ${COPYTREE_SHARE} . ${WWWDIR}/) - (cd ${WRKSRC}/plugins/frontend/ && ${COPYTREE_SHARE} . ${WWWDIR}/plugins/) - (cd ${WRKSRC}/libexec && ${INSTALL_SCRIPT} * ${PREFIX}/libexec/${PORTNAME}/) - (cd ${WRKSRC}/plugins/backend && ${COPYTREE_SHARE} . ${PREFIX}/libexec/${PORTNAME}/plugins/) - ${INSTALL_DATA} ${WRKSRC}/installer-items/CopyRecursive.pm ${PREFIX}/libexec/${PORTNAME}/ - ${INSTALL_DATA} ${WRKSRC}/installer-items/RRDconvertv1.pm ${PREFIX}/libexec/${PORTNAME}/ + ${INSTALL} -d ${STAGEDIR}/${PREFIX}/var/${PORTNAME}/profiles-data/live + ${INSTALL} -d ${STAGEDIR}/${PREFIX}/var/${PORTNAME}/profiles-stat/live + ${INSTALL} -d ${STAGEDIR}/${PREFIX}/var/${PORTNAME}/profiles/live + ${INSTALL} -d ${STAGEDIR}/${PREFIX}/var/${PORTNAME}/filters + ${INSTALL} -d ${STAGEDIR}/${PREFIX}/var/${PORTNAME}/run + ${INSTALL} -d ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/plugins + ${INSTALL} -d ${STAGEDIR}/${WWWDIR}/plugins + (cd ${WRKSRC}/bin && ${INSTALL_SCRIPT} * ${STAGEDIR}/${PREFIX}/bin/) + ${INSTALL_DATA} ${WRKSRC}/etc/nfsen-dist.conf ${STAGEDIR}/${PREFIX}/etc/ + (cd ${WRKSRC}/html && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/) + (cd ${WRKSRC}/plugins/frontend/ && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/plugins/) + (cd ${WRKSRC}/libexec && ${INSTALL_SCRIPT} * ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/) + (cd ${WRKSRC}/plugins/backend && ${COPYTREE_SHARE} . ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/plugins/) + ${INSTALL_DATA} ${WRKSRC}/installer-items/CopyRecursive.pm ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/ + ${INSTALL_DATA} ${WRKSRC}/installer-items/RRDconvertv1.pm ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/ + ${INSTALL_DATA} ${WRKSRC}/conf.php ${STAGEDIR}/${WWWDIR} @${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary sources "; @${ECHO_MSG} "Then run 'nfsen reconfig' to correctly setup source, RRD, and profile files"; -post-install: - PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - .include diff --git a/net-mgmt/nfsen/files/conf.php b/net-mgmt/nfsen/files/conf.php new file mode 100644 index 000000000000..522064bedff5 --- /dev/null +++ b/net-mgmt/nfsen/files/conf.php @@ -0,0 +1,8 @@ + diff --git a/net-mgmt/nfsen/files/pkg-install.in b/net-mgmt/nfsen/files/pkg-install.in deleted file mode 100644 index 1a3ddfb7abd6..000000000000 --- a/net-mgmt/nfsen/files/pkg-install.in +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Created by: Mark Felder -# $FreeBSD$ - -if [ "$2" = "POST-INSTALL" ]; then - -# generate conf.php -/usr/bin/printf "" > %%WWWDIR%%/conf.php - -# chown some files -/usr/sbin/chown -R www:www %%PREFIX%%/var/nfsen - -fi