aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/ganglia-webfrontend
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2006-02-24 10:06:46 +0800
committerbrooks <brooks@FreeBSD.org>2006-02-24 10:06:46 +0800
commitcd54277d4e7df8a43c35c944dac54a70572c9b54 (patch)
tree051b02946393dd04307f54142d2c338a6cfa95f3 /sysutils/ganglia-webfrontend
parent3c8d0a95f541053af6a815de3363a8f1b6722ea5 (diff)
downloadfreebsd-ports-gnome-cd54277d4e7df8a43c35c944dac54a70572c9b54.tar.gz
freebsd-ports-gnome-cd54277d4e7df8a43c35c944dac54a70572c9b54.tar.zst
freebsd-ports-gnome-cd54277d4e7df8a43c35c944dac54a70572c9b54.zip
- Fix the plist so the config file gets removed when unchanged.
- Switch to using dirrmtry to from "unexec rmdir" remove the directory. Approved by: portmgr (marcus)
Diffstat (limited to 'sysutils/ganglia-webfrontend')
-rw-r--r--sysutils/ganglia-webfrontend/Makefile10
-rw-r--r--sysutils/ganglia-webfrontend/pkg-plist5
2 files changed, 9 insertions, 6 deletions
diff --git a/sysutils/ganglia-webfrontend/Makefile b/sysutils/ganglia-webfrontend/Makefile
index 414619e8b090..00ba61dbd8d0 100644
--- a/sysutils/ganglia-webfrontend/Makefile
+++ b/sysutils/ganglia-webfrontend/Makefile
@@ -7,7 +7,7 @@
PORTNAME= webfrontend
PORTVERSION= 3.0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils net parallel www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ganglia
@@ -88,13 +88,15 @@ post-install:
@${CAT} ${PKGMESSAGE}
build-plist:
+ ${RM} ${PLIST}
+ @${ECHO_CMD} '@unexec cmp -s %D/%%WEBFRONTDIR%%/conf.php %D/%%WEBFRONTDIR%%/conf.php.sample && rm -f %D/%%WEBFRONTDIR%%/conf.php' >> ${PLIST}
@${FIND} ${TMP_WEBFRONTDIR}/* -type f | \
${SED} -e 's|${TMP_WEBFRONTDIR}|%%WEBFRONTDIR%%|' | \
- ${SORT} > ${PLIST}
+ ${SORT} >> ${PLIST}
@${FIND} ${TMP_WEBFRONTDIR}/* -type d | \
${SED} -e 's|${TMP_WEBFRONTDIR}|@dirrm %%WEBFRONTDIR%%|' | \
${SORT} -r >> ${PLIST}
- @${ECHO} '@unexec if cmp -s %D/%%WEBFRONTDIR%%/conf.php %D/%%WEBFRONTDIR%%/conf.php.sample ; then rm -f %D/%%WEBFRONTDIR%%/conf.php; fi' >> ${PLIST}
- @${ECHO} '@unexec rmdir %D/%%WEBFRONTDIR%% 2>/dev/null || (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove %D/%%WEBFRONTDIR%% and its contents manually.")' >> ${PLIST}
+ @${ECHO_CMD} '@dirrmtry rmdir %D/%%WEBFRONTDIR%%' >> ${PLIST}
+ @${ECHO_CMD} '@unexec (test -d %D/%%WEBFRONTDIR%% && (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove %D/%%WEBFRONTDIR%% and its contents manually.")) || true' >> ${PLIST}
.include <bsd.port.mk>
diff --git a/sysutils/ganglia-webfrontend/pkg-plist b/sysutils/ganglia-webfrontend/pkg-plist
index 679d0c5f2b0a..eb2f3fea760b 100644
--- a/sysutils/ganglia-webfrontend/pkg-plist
+++ b/sysutils/ganglia-webfrontend/pkg-plist
@@ -1,3 +1,4 @@
+@unexec cmp -s %D/%%WEBFRONTDIR%%/conf.php %D/%%WEBFRONTDIR%%/conf.php.sample && rm -f %D/%%WEBFRONTDIR%%/conf.php
%%WEBFRONTDIR%%/auth.php
%%WEBFRONTDIR%%/class.TemplatePower.inc.php
%%WEBFRONTDIR%%/cluster_legend.html
@@ -65,5 +66,5 @@
@dirrm %%WEBFRONTDIR%%/templates/Rocks/images
@dirrm %%WEBFRONTDIR%%/templates/Rocks
@dirrm %%WEBFRONTDIR%%/templates
-@unexec if cmp -s %D/%%WEBFRONTDIR%%/conf.php %D/%%WEBFRONTDIR%%/conf.php.sample ; then rm -f %D/%%WEBFRONTDIR%%/conf.php; fi
-@unexec rmdir %D/%%WEBFRONTDIR%% 2>/dev/null || (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove %D/%%WEBFRONTDIR%% and its contents manually.")
+@dirrmtry rmdir %D/%%WEBFRONTDIR%%
+@unexec (test -d %D/%%WEBFRONTDIR%% && (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove %D/%%WEBFRONTDIR%% and its contents manually.")) || true