[php-horde-Horde-Http] update to 2.0.2
Remi Collet
remi at fedoraproject.org
Thu Mar 7 09:05:20 UTC 2013
commit e364c408794c937c2fb2ee0755d82df4caf0fb11
Author: Remi Collet <remi at fedoraproject.org>
Date: Thu Mar 7 10:05:12 2013 +0100
update to 2.0.2
.gitignore | 1 +
php-horde-Horde-Http.spec | 69 ++++++++++++++++++++++++++++++--------------
sources | 2 +-
3 files changed, 49 insertions(+), 23 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9a38b40..7f705f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/Horde_Http-1.1.1.tgz
/Horde_Http-2.0.1.tgz
+/Horde_Http-2.0.2.tgz
diff --git a/php-horde-Horde-Http.spec b/php-horde-Horde-Http.spec
index d7ea6f3..f327a11 100644
--- a/php-horde-Horde-Http.spec
+++ b/php-horde-Horde-Http.spec
@@ -1,44 +1,51 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%global pear_name Horde_Http
+%global pear_name Horde_Http
+%global pear_channel pear.horde.org
+
+# Can run test because of circular dependency with Horde_Test
+%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
Name: php-horde-Horde-Http
-Version: 2.0.1
-Release: 2%{?dist}
+Version: 2.0.2
+Release: 1%{?dist}
Summary: Horde HTTP libraries
Group: Development/Libraries
License: BSD
-URL: http://pear.horde.org
-Source0: http://pear.horde.org/get/%{pear_name}-%{version}.tgz
+URL: http://%{pear_channel}
+Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
BuildArch: noarch
BuildRequires: php-pear(PEAR) >= 1.7.0
-BuildRequires: php-channel(pear.horde.org)
+BuildRequires: php-channel(%{pear_channel})
+%if %{with_tests}
+# To run unit tests
+BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
-Provides: php-pear(pear.horde.org/%{pear_name}) = %{version}
-Requires: php-pear(pear.horde.org/Horde_Exception) >= 2.0.0
-Requires: php-pear(pear.horde.org/Horde_Support) >= 2.0.0
Requires: php-common >= 5.3.0
+Requires: php-pcre
Requires: php-pear(PEAR) >= 1.7.0
-Requires: php-channel(pear.horde.org)
+Requires: php-channel(%{pear_channel})
+Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Support) >= 2.0.0
+
+Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
+
%description
This package provides a set of classes for making HTTP requests.
+
%prep
%setup -q -c
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{name}.xml
-
-# Create a "localized" php.ini to avoid build warning
-cp /etc/php.ini .
-echo "date.timezone=UTC" >>php.ini
cd %{pear_name}-%{version}
+mv ../package.xml %{name}.xml
%build
@@ -48,14 +55,27 @@ cd %{pear_name}-%{version}
%install
cd %{pear_name}-%{version}
-PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
# Clean up unnecessary files
-rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
+rm -rf %{buildroot}%{pear_metadir}/.??*
# 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}/test/$(echo %{pear_name} | sed -e s:_:/:g)
+phpunit\
+ -d include_path=%{buildroot}%{pear_phpdir}:.:%{pear_phpdir} \
+ -d date.timezone=UTC \
+ .
+%else
+: Test disabled, missing '--with tests' option.
+%endif
+
%post
%{__pear} install --nodeps --soft --force --register-only \
@@ -64,7 +84,7 @@ install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
%postun
if [ $1 -eq 0 ] ; then
%{__pear} uninstall --nodeps --ignore-errors --register-only \
- pear.horde.org/%{pear_name} >/dev/null || :
+ %{pear_channel}/%{pear_name} >/dev/null || :
fi
%files
@@ -72,9 +92,14 @@ fi
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/Horde/Http
%{pear_phpdir}/Horde/Http.php
-%{pear_testdir}/Horde_Http
+%{pear_testdir}/%{pear_name}
+
%changelog
+* Wed Mar 06 2013 Remi Collet <remi at fedoraproject.org> - 2.0.2-1
+- Update to 2.0.2
+- run test when build with --with tests option
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/sources b/sources
index 6340d66..528bb8d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fccf6a2ecf223e3bf8df31f4bd15045e Horde_Http-2.0.1.tgz
+f0a212dcb6ad0aba78be5d23a7dc4223 Horde_Http-2.0.2.tgz
More information about the scm-commits
mailing list