summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-02-12 05:43:47 +0000
committeredwin <edwin@FreeBSD.org>2003-02-12 05:43:47 +0000
commit472629495f837e93dc28407eda49ed28e02eec45 (patch)
tree36bfca5e7141b3dbe4d36f620a1652b855e0a5a1
parent12998aa81ca3dc196d4221f550a21c6cc469dbac (diff)
downloadFreeBSD-ports-472629495f837e93dc28407eda49ed28e02eec45.zip
FreeBSD-ports-472629495f837e93dc28407eda49ed28e02eec45.tar.gz
devel/pear-PEAR: fixing deinstallation.
- lib/php/OS is not back-up'ed when installing devel/pear-PEAR, and the original is lost when you deinstall it. - tidy code a little. PR: ports/47819 Submitted by: Thierry Thomas <thierry@pompo.net>
-rw-r--r--devel/pear-PEAR/Makefile17
-rw-r--r--devel/pear-PEAR/pkg-plist2
2 files changed, 10 insertions, 9 deletions
diff --git a/devel/pear-PEAR/Makefile b/devel/pear-PEAR/Makefile
index 74406b0..17479f8 100644
--- a/devel/pear-PEAR/Makefile
+++ b/devel/pear-PEAR/Makefile
@@ -29,17 +29,16 @@ PHP_BASE!= ${LOCALBASE}/bin/php-config --prefix
LPHP_LIB= lib/php
PEARDIR= ${PHP_BASE}/${LPHP_LIB}
PLIST_SUB= PEARDIR=${LPHP_LIB}
+MANIFEST= OS PEAR PEAR.php System.php package.dtd scripts template.spec
+TOBACKUP= OS PEAR PEAR.php System.php
do-install:
- @${MV} ${PEARDIR}/PEAR ${PEARDIR}/PEAR.dist
- @${MV} ${PEARDIR}/PEAR.php ${PEARDIR}/PEAR.php.dist
- @${MV} ${PEARDIR}/System.php ${PEARDIR}/System.php.dist
+.for FILE in ${TOBACKUP}
+ @${MV} ${PEARDIR}/${FILE} ${PEARDIR}/${FILE}.dist
+.endfor
@${CP} -Rp ${WRKSRC}/* ${PEARDIR}
- @${CHOWN} -R root:wheel ${PEARDIR}/OS
- @${CHOWN} -R root:wheel ${PEARDIR}/PEAR*
- @${CHOWN} -R root:wheel ${PEARDIR}/System.php
- @${CHOWN} -R root:wheel ${PEARDIR}/package.dtd
- @${CHOWN} -R root:wheel ${PEARDIR}/scripts
- @${CHOWN} -R root:wheel ${PEARDIR}/template.spec
+.for FILE in ${MANIFEST}
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PEARDIR}/${FILE}
+.endfor
.include <bsd.port.post.mk>
diff --git a/devel/pear-PEAR/pkg-plist b/devel/pear-PEAR/pkg-plist
index 7c18a96..c66aba5 100644
--- a/devel/pear-PEAR/pkg-plist
+++ b/devel/pear-PEAR/pkg-plist
@@ -1,3 +1,4 @@
+@exec mv %D/lib/php/OS %D/lib/php/OS.dist
@exec mv %D/lib/php/PEAR %D/lib/php/PEAR.dist
@exec mv %D/lib/php/PEAR.php %D/lib/php/PEAR.php.dist
@exec mv %D/lib/php/System.php %D/lib/php/System.php.dist
@@ -32,6 +33,7 @@
@dirrm %%PEARDIR%%/PEAR/Frontend
@dirrm %%PEARDIR%%/PEAR
@dirrm %%PEARDIR%%/scripts
+@unexec mv %D/lib/php/OS.dist %D/lib/php/OS || true
@unexec mv %D/lib/php/PEAR.dist %D/lib/php/PEAR || true
@unexec mv %D/lib/php/PEAR.php.dist %D/lib/php/PEAR.php || true
@unexec mv %D/lib/php/System.php.dist %D/lib/php/System.php || true
OpenPOWER on IntegriCloud