aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nfsen
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2014-03-17 01:05:34 +0000
committerMark Felder <feld@FreeBSD.org>2014-03-17 01:05:34 +0000
commitd6f8c6d5b401356b6aaa956ed68a75390e3d11ec (patch)
tree84ecd4af1d252758e25be9205310b2d499e8e528 /net-mgmt/nfsen
parent3b8a674f5b933adde829f9696b21c25ab3e22e56 (diff)
downloadports-d6f8c6d5b401356b6aaa956ed68a75390e3d11ec.tar.gz
ports-d6f8c6d5b401356b6aaa956ed68a75390e3d11ec.zip
Notes
Diffstat (limited to 'net-mgmt/nfsen')
-rw-r--r--net-mgmt/nfsen/Makefile38
-rw-r--r--net-mgmt/nfsen/files/conf.php8
-rw-r--r--net-mgmt/nfsen/files/pkg-install.in20
3 files changed, 26 insertions, 40 deletions
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 <bsd.port.mk>
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 @@
+<?php
+/* This file was automatically created by the NfSen %%PORTVERSION%% install.pl script */
+
+$COMMSOCKET = "%%PREFIX%%/var/nfsen/run/nfsen.comm";
+
+$DEBUG=0;
+
+?>
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 <feld@FreeBSD.org>
-# $FreeBSD$
-
-if [ "$2" = "POST-INSTALL" ]; then
-
-# generate conf.php
-/usr/bin/printf "<?php
-/* This file was automatically created by the NfSen %%PORTVERSION%% install.pl script */
-
-\$COMMSOCKET = \"%%PREFIX%%/var/nfsen/run/nfsen.comm\";
-
-\$DEBUG=0;
-
-?>" > %%WWWDIR%%/conf.php
-
-# chown some files
-/usr/sbin/chown -R www:www %%PREFIX%%/var/nfsen
-
-fi