aboutsummaryrefslogtreecommitdiffstats
path: root/devel/pear/pear-deinstall.in
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2011-06-22 16:53:29 +0800
committermm <mm@FreeBSD.org>2011-06-22 16:53:29 +0800
commit7314ea497e25ae138adedd3b94064706d37a09bf (patch)
treea00bf4f2a859b75fe0a53845626f928c4ebf911e /devel/pear/pear-deinstall.in
parent8e38f7fab644ad7d7735bd65538b23d0fe9dc82e (diff)
downloadfreebsd-ports-gnome-7314ea497e25ae138adedd3b94064706d37a09bf.tar.gz
freebsd-ports-gnome-7314ea497e25ae138adedd3b94064706d37a09bf.tar.zst
freebsd-ports-gnome-7314ea497e25ae138adedd3b94064706d37a09bf.zip
Add support for channels and automatic plist generation to bsd.pear.mk
PR: ports/157269 Approved by: maintainer (timeout)
Diffstat (limited to 'devel/pear/pear-deinstall.in')
-rw-r--r--devel/pear/pear-deinstall.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/devel/pear/pear-deinstall.in b/devel/pear/pear-deinstall.in
new file mode 100644
index 000000000000..de1886f48c4a
--- /dev/null
+++ b/devel/pear/pear-deinstall.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Remove package declaration from PEAR's registry.
+
+if [ x$2 != xDEINSTALL ]; then
+ exit
+fi
+
+PKG_NAME=${1%%-[0-9._]*}
+CHANNEL=%%PEAR_CHANNEL%%
+PEAR=${PKG_PREFIX}/bin/pear
+
+if [ -z "$CHANNEL" ]; then
+ PACKAGE=$(echo $PKG_NAME | sed "s/pear-//")
+ ${PEAR} uninstall -r -n ${PACKAGE} || true
+else
+ PACKAGE=$(echo $PKG_NAME | sed "s/pear-${CHANNEL}-//")
+ ${PEAR} uninstall -r -n ${CHANNEL}/${PACKAGE} || true
+fi