summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Bergmann <sebastian@gentoo.org>2005-03-18 08:17:38 +0000
committerSebastian Bergmann <sebastian@gentoo.org>2005-03-18 08:17:38 +0000
commitf792f99c44e2b715d2379aa9a28eaec2e8ba4bf3 (patch)
tree35955eedaad81f49ebdc36ed47048fed0b1bdcff /dev-php/PEAR-PEAR
parent(Portage version: 2.0.51.19) (Manifest recommit) (diff)
downloadgentoo-2-f792f99c44e2b715d2379aa9a28eaec2e8ba4bf3.tar.gz
gentoo-2-f792f99c44e2b715d2379aa9a28eaec2e8ba4bf3.tar.bz2
gentoo-2-f792f99c44e2b715d2379aa9a28eaec2e8ba4bf3.zip
Add migration functionality for the /usr/lib/php -> /usr/share/php move to pkg_preinst(). Add warning about this move to pkg_postinst(). Restore KEYWORDS.
(Portage version: 2.0.51.19)
Diffstat (limited to 'dev-php/PEAR-PEAR')
-rw-r--r--dev-php/PEAR-PEAR/ChangeLog8
-rw-r--r--dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild26
2 files changed, 31 insertions, 3 deletions
diff --git a/dev-php/PEAR-PEAR/ChangeLog b/dev-php/PEAR-PEAR/ChangeLog
index 01e354a0c5c5..c0f20d478e27 100644
--- a/dev-php/PEAR-PEAR/ChangeLog
+++ b/dev-php/PEAR-PEAR/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-php/PEAR-PEAR
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-PEAR/ChangeLog,v 1.13 2005/03/14 15:36:11 sebastian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-PEAR/ChangeLog,v 1.14 2005/03/18 08:17:38 sebastian Exp $
+
+ 18 Mar 2005; Sebastian Bergmann <sebastian@gentoo.org>
+ PEAR-PEAR-1.3.5-r1.ebuild:
+ Add migration functionality for the /usr/lib/php -> /usr/share/php move to
+ pkg_preinst(). Add warning about this move to pkg_postinst(). Restore
+ KEYWORDS.
14 Mar 2005; Sebastian Bergmann <sebastian@gentoo.org>
PEAR-PEAR-1.3.5-r1.ebuild:
diff --git a/dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild b/dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild
index cfdb60cca7cb..6b4b5be84517 100644
--- a/dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild
+++ b/dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild,v 1.5 2005/03/14 15:36:11 sebastian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild,v 1.6 2005/03/18 08:17:38 sebastian Exp $
ARCHIVE_TAR="1.2"
CONSOLE_GETOPT="1.2"
@@ -16,13 +16,28 @@ SRC_URI="http://pear.php.net/get/Archive_Tar-${ARCHIVE_TAR}.tgz
LICENSE="PHP"
SLOT="0"
-KEYWORDS="x86 amd64 ~ppc64 ~ppc ~ia64 ~sparc ~alpha ~hppa"
+KEYWORDS="~x86 ~amd64 ~ppc64 ~ppc ~ia64 ~sparc ~alpha ~hppa"
IUSE=""
DEPEND="virtual/php dev-php/php"
PDEPEND=">=dev-php/PEAR-Archive_Tar-1.1
>=dev-php/PEAR-Console_Getopt-1.2
>=dev-php/PEAR-XML_RPC-1.0.4"
+pkg_preinst() {
+ if [[ -d "${ROOT}"/usr/lib/php ]] && [[ ! -e "${ROOT}"/usr/share/php ]] ; then
+ for f in /usr/lib/php/*
+ do
+ if [ "$f" != "/usr/lib/php/build" ] &&
+ [ "$f" != "/usr/lib/php/extensions" ]
+ then mv $f /usr/share/php;
+ fi
+ done
+
+ sed -i 's:/usr/lib/php:/usr/share/php:g' ${ROOT}/usr/bin/pear || die
+ rm ${ROOT}/etc/pear.conf
+ fi
+}
+
src_install() {
if has_version "dev-php/PEAR-PEAR"; then
install_pear_without_bootstrap
@@ -32,6 +47,13 @@ src_install() {
fi
}
+pkg_postinst() {
+ ewarn "The location of the local PEAR repository has been changed"
+ ewarn "from /usr/lib/php to /usr/share/php."
+ ewarn "If you had a standard setup previously installed PEAR packages"
+ ewarn "have been moved to the new location."
+}
+
bootstrap_pear() {
mkdir -p ${WORKDIR}/PEAR/XML/RPC