aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorfeld <feld@FreeBSD.org>2014-03-17 09:05:34 +0800
committerfeld <feld@FreeBSD.org>2014-03-17 09:05:34 +0800
commitc72283fe3e09b339b359b09a5a8ccd0e4b656b69 (patch)
tree84ecd4af1d252758e25be9205310b2d499e8e528 /net-mgmt
parent56a28c5bab0cbddb6610ed6ae3fe6131be92ca60 (diff)
downloadfreebsd-ports-gnome-c72283fe3e09b339b359b09a5a8ccd0e4b656b69.tar.gz
freebsd-ports-gnome-c72283fe3e09b339b359b09a5a8ccd0e4b656b69.tar.zst
freebsd-ports-gnome-c72283fe3e09b339b359b09a5a8ccd0e4b656b69.zip
Support STAGE
Diffstat (limited to 'net-mgmt')
-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