svn commit: r353039 - in head/ports-mgmt/p5-FreeBSD-Portindex: . files

Matthew Seaman matthew at FreeBSD.org
Mon May 5 20:13:40 UTC 2014


Author: matthew
Date: Mon May  5 20:13:39 2014
New Revision: 353039
URL: http://svnweb.freebsd.org/changeset/ports/353039
QAT: https://qat.redports.org/buildarchive/r353039/

Log:
  Clean up the /var/db/portindex directory (if it is empty) on
  deinstallation.
  
  Submitted by:	swills (via jenkins.freebsd.org)

Added:
  head/ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in   (contents, props changed)
Modified:
  head/ports-mgmt/p5-FreeBSD-Portindex/Makefile

Modified: head/ports-mgmt/p5-FreeBSD-Portindex/Makefile
==============================================================================
--- head/ports-mgmt/p5-FreeBSD-Portindex/Makefile	Mon May  5 19:56:24 2014	(r353038)
+++ head/ports-mgmt/p5-FreeBSD-Portindex/Makefile	Mon May  5 20:13:39 2014	(r353039)
@@ -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} ; \

Added: head/ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in	Mon May  5 20:13:39 2014	(r353039)
@@ -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!
+#


More information about the svn-ports-all mailing list