aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports-mgmt/p5-FreeBSD-Portindex/Makefile5
-rw-r--r--ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in23
2 files changed, 26 insertions, 2 deletions
diff --git a/ports-mgmt/p5-FreeBSD-Portindex/Makefile b/ports-mgmt/p5-FreeBSD-Portindex/Makefile
index 0bbc76ac26db..f5d713f64c0d 100644
--- a/ports-mgmt/p5-FreeBSD-Portindex/Makefile
+++ b/ports-mgmt/p5-FreeBSD-Portindex/Makefile
@@ -3,6 +3,7 @@
PORTNAME= FreeBSD-Portindex
PORTVERSION= 3.4
+PORTREVISION= 1
CATEGORIES= ports-mgmt perl5
MASTER_SITES= http://www.infracaninophile.co.uk/portindex/
PKGNAMEPREFIX= p5-
@@ -37,13 +38,13 @@ CACHE_MODE?= 0775
CFG_FILE= portindex.cfg
-SUB_FILES+= pkg-install
+SUB_FILES+= pkg-install pkg-deinstall
SUB_LIST+= CACHE_DIR=${CACHE_DIR} \
CACHE_OWNER=${CACHE_OWNER} \
CACHE_GROUP=${CACHE_GROUP} \
CACHE_MODE=${CACHE_MODE}
-post-install: install-conf
+post-install: install-conf
install-conf:
cd ${WRKSRC} ; \
diff --git a/ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in b/ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in
new file mode 100644
index 000000000000..fa79034099ab
--- /dev/null
+++ b/ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+CACHE_DIR=%%CACHE_DIR%%
+
+case $2 in
+
+ # Remove the cache directory, but only if it is empty.
+
+ POST-DEINSTALL)
+ if [ ! -d ${CACHE_DIR} ] ; then
+ rmdir ${CACHE_DIR} >/dev/null 2>&1 || true
+ fi
+ ;;
+esac
+
+#
+# That's All Folks!
+#