aboutsummaryrefslogtreecommitdiff
path: root/devel/pear-PHPUnit
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-01-13 00:10:33 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-01-13 00:10:33 +0000
commitd30ad5f92b339ef383c84cd28390e8df41c8939b (patch)
tree5d97ee8cf6a1e9decd7bbcd533f5e26d5ff269ac /devel/pear-PHPUnit
parentfc51d4d9249f543f87368c7f1ae1a1d41c9f12b5 (diff)
downloadports-d30ad5f92b339ef383c84cd28390e8df41c8939b.tar.gz
ports-d30ad5f92b339ef383c84cd28390e8df41c8939b.zip
Notes
Diffstat (limited to 'devel/pear-PHPUnit')
-rw-r--r--devel/pear-PHPUnit/files/pear-deinstall.in27
-rw-r--r--devel/pear-PHPUnit/files/pear-install.in19
2 files changed, 46 insertions, 0 deletions
diff --git a/devel/pear-PHPUnit/files/pear-deinstall.in b/devel/pear-PHPUnit/files/pear-deinstall.in
new file mode 100644
index 000000000000..ccbf7b82cb25
--- /dev/null
+++ b/devel/pear-PHPUnit/files/pear-deinstall.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Remove package declaration from PEAR's registry and optionally delete
+# a non-standard channel.
+
+if [ x$2 != xDEINSTALL -a x$2 != xPOST-DEINSTALL ]; then
+ exit
+fi
+PKG_NAME=${1%%-[0-9._]*}
+PACKAGE=$(echo $PKG_NAME | sed 's/pear-//')
+
+PEAR=${PKG_PREFIX}/bin/pear
+CHANNEL=%%CHANNEL%%
+
+if [ "$2" = "DEINSTALL" ]; then
+ if [ "x${CHANNEL}" != "x" ]; then
+ ${PEAR} uninstall -r -n ${CHANNEL}/${PACKAGE} || true
+ else
+ ${PEAR} uninstall -r -n ${PACKAGE} || true
+ fi
+else
+ if [ "x${CHANNEL}" != "x" ]; then
+ ${PEAR} channel-delete ${CHANNEL}
+ fi
+fi
diff --git a/devel/pear-PHPUnit/files/pear-install.in b/devel/pear-PHPUnit/files/pear-install.in
new file mode 100644
index 000000000000..2ec01250b2f3
--- /dev/null
+++ b/devel/pear-PHPUnit/files/pear-install.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Register the package $1 in the port registry and optionally add a
+# non-standard channel.
+
+PREFIX=${PKG_PREFIX:=%%PREFIX%%}
+PEAR=${PREFIX}/bin/pear
+PKGREGDIR=${PREFIX}/share/pear/packages/$1
+CHANNEL=%%CHANNEL%%
+
+[ "x$1" = "x" ] && exit 1
+if [ "x$2" = "xPOST-INSTALL" ]; then
+ if [ "x${CHANNEL}" != "x" ]; then
+ ${PEAR} channel-add http://${CHANNEL}/channel.xml
+ fi
+ ${PEAR} install -r -n -f ${PKGREGDIR}/package.xml
+fi