[php-pear] - move tests to /usr/share/tests/pear - move pkgxml to /var/lib/pear - remove XML_RPC - refresh inst
Remi Collet
remi at fedoraproject.org
Tue Aug 14 10:05:51 UTC 2012
commit fee8e158d5153613a1d71e7144b2874c4476b39a
Author: remi <fedora at famillecollet.com>
Date: Tue Aug 14 12:05:26 2012 +0200
- move tests to /usr/share/tests/pear
- move pkgxml to /var/lib/pear
- remove XML_RPC
- refresh installer
install-pear.php | 42 +++++++++++++++++++++++++++++++-----------
macros.pear | 4 ++--
php-pear.spec | 41 +++++++++++++++++++++++------------------
3 files changed, 56 insertions(+), 31 deletions(-)
---
diff --git a/install-pear.php b/install-pear.php
index a8ca995..c06dc04 100644
--- a/install-pear.php
+++ b/install-pear.php
@@ -43,7 +43,7 @@ for ($i = 0; $i < sizeof($argv); $i++) {
if (preg_match('/package-(.*)\.xml$/', $bn, $matches) ||
preg_match('/([A-Za-z0-9_:]+)-.*\.(tar|tgz)$/', $bn, $matches)) {
$install_files[$matches[1]] = $arg;
- } elseif ($arg == '-a') {
+ } elseif ($arg == '-a' || $arg == '--cache') {
$cache_dir = $argv[$i+1];
$i++;
} elseif ($arg == '--force') {
@@ -54,30 +54,36 @@ for ($i = 0; $i < sizeof($argv); $i++) {
} elseif ($arg == '-ds') {
$suffix = $argv[$i+1];
$i++;
- } elseif ($arg == '-d') {
+ } elseif ($arg == '-d' || $arg == '--dir') {
$with_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-b') {
+ } elseif ($arg == '-b' || $arg == '--bin') {
$bin_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-c') {
+ } elseif ($arg == '-c' || $arg == '--config') {
$cfg_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-w') {
+ } elseif ($arg == '-w' || $arg == '--www') {
$www_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-p') {
+ } elseif ($arg == '-p' || $arg == '--php') {
$php_bin = $argv[$i+1];
$i++;
- } elseif ($arg == '-o') {
+ } elseif ($arg == '-o' || $arg == '--download') {
$download_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-t') {
+ } elseif ($arg == '-t' || $arg == '--temp') {
$temp_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-D') {
+ } elseif ($arg == '-A' || $arg == '--data') {
+ $data_dir = $argv[$i+1];
+ $i++;
+ } elseif ($arg == '-D' || $arg == '--doc') {
$doc_dir = $argv[$i+1];
$i++;
+ } elseif ($arg == '-T' || $arg == '--test') {
+ $test_dir = $argv[$i+1];
+ $i++;
} elseif ($arg == '--debug') {
$debug = 1;
} elseif ($arg == '--extremedebug') {
@@ -139,6 +145,16 @@ if (!empty($doc_dir)) {
$config->set('doc_dir', $doc_dir, 'default');
}
+// Data files
+if (!empty($data_dir)) {
+ $config->set('data_dir', $data_dir, 'default');
+}
+
+// Unit tests
+if (!empty($test_dir)) {
+ $config->set('test_dir', $test_dir, 'default');
+}
+
// User supplied a dir prefix
if (!empty($with_dir)) {
$ds = DIRECTORY_SEPARATOR;
@@ -146,8 +162,12 @@ if (!empty($with_dir)) {
if (empty($doc_dir)) {
$config->set('doc_dir', $with_dir . $ds . 'doc', 'default');
}
- $config->set('data_dir', $with_dir . $ds . 'data', 'default');
- $config->set('test_dir', $with_dir . $ds . 'test', 'default');
+ if (empty($data_dir)) {
+ $config->set('data_dir', $with_dir . $ds . 'data', 'default');
+ }
+ if (empty($test_dir)) {
+ $config->set('test_dir', $with_dir . $ds . 'test', 'default');
+ }
if (empty($www_dir)) {
$config->set('www_dir', $with_dir . $ds . 'htdocs', 'default');
}
diff --git a/macros.pear b/macros.pear
index f55c079..deabb08 100644
--- a/macros.pear
+++ b/macros.pear
@@ -25,8 +25,8 @@
#
# Define XML directories to store package registration information:
#
-%pear_xmldir %{pear_phpdir}/.pkgxml
-%pecl_xmldir %{pecl_phpdir}/.pkgxml
+%pear_xmldir %{_localstatedir}/lib/pear/pkgxml
+%pecl_xmldir %{_localstatedir}/lib/pear/pkgxml
#
# Define macros to be used in scriplets for php-pecl-* spec files:
diff --git a/php-pear.spec b/php-pear.spec
index 5d55cd2..329de47 100644
--- a/php-pear.spec
+++ b/php-pear.spec
@@ -1,8 +1,5 @@
%global peardir %{_datadir}/pear
-# https://pear.php.net/bugs/bug.php?id=19368
-# XML_RPC Please Provides LICENSE file
-%global xmlrpcver 1.5.5
%global getoptver 1.3.1
%global arctarver 1.3.10
# https://pear.php.net/bugs/bug.php?id=19367
@@ -17,10 +14,10 @@
Summary: PHP Extension and Application Repository framework
Name: php-pear
Version: 1.9.4
-Release: 8%{?dist}
+Release: 9%{?dist}
Epoch: 1
# PEAR, Archive_Tar, XML_Util are BSD
-# XML-RPC, Console_Getopt are PHP
+# Console_Getopt is PHP
# Structures_Graph is LGPLv2+
License: BSD and PHP and LGPLv2+
Group: Development/Languages
@@ -30,17 +27,16 @@ Source0: http://download.pear.php.net/package/PEAR-%{version}.tgz
Source1: install-pear.php
Source2: relocate.php
Source3: strip.php
-Source4: LICENSE-XML_RPC
Source10: pear.sh
Source11: pecl.sh
Source12: peardev.sh
Source13: macros.pear
-Source20: http://pear.php.net/get/XML_RPC-%{xmlrpcver}.tgz
Source21: http://pear.php.net/get/Archive_Tar-%{arctarver}.tgz
Source22: http://pear.php.net/get/Console_Getopt-%{getoptver}.tgz
Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz
Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz
# From RHEL: ignore REST cache creation failures as non-root user (#747361)
+# TODO See https://github.com/pear/pear-core/commit/dfef86e05211d2abc7870209d69064d448ef53b3#PEAR/REST.php
Patch0: php-pear-1.9.4-restcache.patch
BuildArch: noarch
@@ -54,7 +50,6 @@ Provides: php-pear(Console_Getopt) = %{getoptver}
Provides: php-pear(Archive_Tar) = %{arctarver}
Provides: php-pear(PEAR) = %{version}
Provides: php-pear(Structures_Graph) = %{structver}
-Provides: php-pear(XML_RPC) = %{xmlrpcver}
Provides: php-pear(XML_Util) = %{xmlutil}
Obsoletes: php-pear-XML-Util < %{xmlutil}-%{release}
Provides: php-pear-XML-Util = %{xmlutil}-%{release}
@@ -102,7 +97,7 @@ export PHP_PEAR_TEMP_DIR=/var/tmp
install -d $RPM_BUILD_ROOT%{peardir} \
$RPM_BUILD_ROOT%{_localstatedir}/cache/php-pear \
$RPM_BUILD_ROOT%{_localstatedir}/www/html \
- $RPM_BUILD_ROOT%{peardir}/.pkgxml \
+ $RPM_BUILD_ROOT%{_localstatedir}/lib/pear/pkgxml \
$RPM_BUILD_ROOT%{_sysconfdir}/rpm \
$RPM_BUILD_ROOT%{_sysconfdir}/pear
@@ -110,12 +105,13 @@ export INSTALL_ROOT=$RPM_BUILD_ROOT
%{_bindir}/php -n -dmemory_limit=32M -dshort_open_tag=0 -dsafe_mode=0 \
-derror_reporting=E_ALL -ddetect_unicode=0 \
- %{SOURCE1} -d %{peardir} \
- -c %{_sysconfdir}/pear \
- -b %{_bindir} \
- -w %{_localstatedir}/www/html \
- -D %{_docdir}/pear \
- %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE20}
+ %{SOURCE1} --dir %{peardir} \
+ --config %{_sysconfdir}/pear \
+ --bin %{_bindir} \
+ --www %{_localstatedir}/www/html \
+ --doc %{_docdir}/pear \
+ --test %{_datarootdir}/tests/pear \
+ %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24}
# Replace /usr/bin/* with simple scripts:
install -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pear
@@ -130,7 +126,6 @@ install -m 755 %{SOURCE12} $RPM_BUILD_ROOT%{_bindir}/peardev
%{_bindir}/php -r "print_r(unserialize(substr(file_get_contents('$RPM_BUILD_ROOT%{_sysconfdir}/pear.conf'),17)));"
-install -m 644 -c %{SOURCE4} LICENSE-XML_RPC
install -m 644 -c %{SOURCE13} \
$RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.pear
@@ -146,7 +141,7 @@ popd
rm -rf $RPM_BUILD_ROOT/.depdb* $RPM_BUILD_ROOT/.lock $RPM_BUILD_ROOT/.channels $RPM_BUILD_ROOT/.filemap
# Need for re-registrying XML_Util
-install -m 644 XML_Util.xml $RPM_BUILD_ROOT%{peardir}/.pkgxml/
+install -m 644 XML_Util.xml $RPM_BUILD_ROOT%{_localstatedir}/lib/pear/pkgxml
%check
@@ -183,7 +178,8 @@ rm new-pear.conf
%triggerpostun -- php-pear-XML-Util
# re-register extension unregistered during postun of obsoleted php-pear-XML-Util
-%{_bindir}/pear install --nodeps --soft --force --register-only %{pear_xmldir}/XML_Util.xml >/dev/null || :
+%{_bindir}/pear install --nodeps --soft --force --register-only \
+ %{_localstatedir}/lib/pear/pkgxml/XML_Util.xml >/dev/null || :
%files
@@ -198,9 +194,18 @@ rm new-pear.conf
%doc README* LICENSE*
%dir %{_docdir}/pear
%doc %{_docdir}/pear/*
+%dir %{_datarootdir}/tests
+%{_datarootdir}/tests/pear
+%{_localstatedir}/lib/pear
%changelog
+* Mon Aug 13 2012 Remi Collet <remi at fedoraproject.org> 1:1.9.4-9
+- move tests to /usr/share/tests/pear
+- move pkgxml to /var/lib/pear
+- remove XML_RPC
+- refresh installer
+
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:1.9.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list