[php-pear-HTTP-Request2] update to 2.0.0
Remi Collet
remi at fedoraproject.org
Sun Oct 23 06:43:59 UTC 2011
commit ad40d55a4539a3424a730a6b9b687e5b642183cd
Author: remi <fedora at famillecollet.com>
Date: Sun Oct 23 08:43:24 2011 +0200
update to 2.0.0
.gitignore | 2 +
php-pear-HTTP-Request2.spec | 52 +++++++++++++++++++++++++-----------------
sources | 2 +-
3 files changed, 34 insertions(+), 22 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bfdbf8c..f31aceb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
package*.xml
+*spec~
HTTP_Request2-0.5.2.tgz
/HTTP_Request2-0.6.0.tgz
+/HTTP_Request2-2.0.0.tgz
diff --git a/php-pear-HTTP-Request2.spec b/php-pear-HTTP-Request2.spec
index fbae9b0..36a2725 100644
--- a/php-pear-HTTP-Request2.spec
+++ b/php-pear-HTTP-Request2.spec
@@ -1,9 +1,10 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%global pear_name HTTP_Request2
+%global pear_name HTTP_Request2
+%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
Name: php-pear-HTTP-Request2
-Version: 0.6.0
-Release: 2%{?dist}
+Version: 2.0.0
+Release: 1%{?dist}
Summary: Provides an easy way to perform HTTP requests
Group: Development/Libraries
@@ -16,16 +17,18 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear(PEAR) >= 1.5.4
# For test suite
+%if %{with_tests}
BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
-BuildRequires: php-pear(Net_URL2) >= 0.2.0
+BuildRequires: php-pear(Net_URL2) >= 2.0.0
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides: php-pear(%{pear_name}) = %{version}
-Requires: php-pear(Net_URL2) >= 0.2.0
+Requires: php-pear(Net_URL2) >= 2.0.0
Requires: php-pear(PEAR) >= 1.5.4
# Optional dependencies from pci result
-Requires: php-mbstring >= 5.1.4
+Requires: php-mbstring >= 5.2.0
Requires: php-pecl(Fileinfo)
%description
@@ -43,10 +46,6 @@ the request progress with Observers...
# Generate Changelog
%{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG
-# Create a "localized" php.ini to avoid build warning
-cp /etc/php.ini .
-echo "date.timezone=UTC" >>php.ini
-
cd %{pear_name}-%{version}
# package.xml is V2
mv ../package.xml %{name}.xml
@@ -58,33 +57,39 @@ cd %{pear_name}-%{version}
%install
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
cd %{pear_name}-%{version}
-PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
# for rpmlint
-sed -i -e 's/\r//' $RPM_BUILD_ROOT%{pear_docdir}/%{pear_name}/examples/upload-rapidshare.php
+sed -i -e 's/\r//' %{buildroot}%{pear_docdir}/%{pear_name}/examples/upload-rapidshare.php
# Clean up unnecessary files
-rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
+rm -rf %{buildroot}%{pear_phpdir}/.??*
# Install XML package description
-mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
-install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+mkdir -p %{buildroot}%{pear_xmldir}
+install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
%check
+%if %{with_tests}
cd %{pear_name}-%{version}/tests
-# Minimal test suite (other tests require a webserver)
-# Tests: 39, Assertions: 84, Skipped: 3.
+# Test requires package to be installed (for data_dir)
+# See http://pear.php.net/bugs/18924
+# Tests: 95, Assertions: 162, Skipped: 3.
+
phpunit \
-d date.timezone=UTC \
- -d include_path=$RPM_BUILD_ROOT%{pear_phpdir}:%{pear_phpdir} \
+ -d include_path=.:%{buildroot}%{pear_phpdir}:%{pear_phpdir} \
AllTests.php
+%else
+echo 'Test suite disabled (missing "--with tests" option)'
+%endif
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%post
@@ -104,10 +109,15 @@ fi
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/HTTP
-%{pear_testdir}/HTTP_Request2
+%{pear_testdir}/%{pear_name}
+%{pear_datadir}/%{pear_name}
%changelog
+* Sat Oct 22 2011 Remi Collet <remi at fedoraproject.org> - 2.0.0-1
+- Version 2.0.0 (stable) - API 2.0.0 (stable)
+- ass "tests" option
+
* Sun Apr 17 2011 Remi Collet <Fedora at FamilleCollet.com> 0.6.0-2
- doc in /usr/share/doc/pear
diff --git a/sources b/sources
index a126ef1..9a6a91a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a750600a3195f90979c8a0d0266b60c9 HTTP_Request2-0.6.0.tgz
+e8598d228909213cb829fe617247b199 HTTP_Request2-2.0.0.tgz
More information about the scm-commits
mailing list