From 472629495f837e93dc28407eda49ed28e02eec45 Mon Sep 17 00:00:00 2001 From: edwin Date: Wed, 12 Feb 2003 05:43:47 +0000 Subject: 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 --- devel/pear-PEAR/Makefile | 17 ++++++++--------- devel/pear-PEAR/pkg-plist | 2 ++ 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 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 -- cgit v1.1