[php-horde-Horde-Support] update to 2.0.3
Remi Collet
remi at fedoraproject.org
Wed Jan 30 06:06:37 UTC 2013
commit 502fc4b3240c698669023bfa87de6cbdc0e0c198
Author: Remi Collet <remi at fedoraproject.org>
Date: Wed Jan 30 07:06:29 2013 +0100
update to 2.0.3
.gitignore | 1 +
php-horde-Horde-Support.spec | 51 +++++++++++++++++++++++++++++------------
sources | 2 +-
3 files changed, 38 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ab619b0..71bfb53 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/Horde_Support-1.0.2.tgz
/Horde_Support-2.0.2.tgz
+/Horde_Support-2.0.3.tgz
diff --git a/php-horde-Horde-Support.spec b/php-horde-Horde-Support.spec
index dc62ec9..2f0d169 100644
--- a/php-horde-Horde-Support.spec
+++ b/php-horde-Horde-Support.spec
@@ -1,31 +1,39 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%global pear_name Horde_Support
+%global pear_name Horde_Support
+%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-Support
-Version: 2.0.2
+Version: 2.0.3
Release: 1%{?dist}
Summary: Horde support package
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}
-Requires: php-pear(pear.horde.org/Horde_Exception) >= 2.0.0
-Requires: php-pear(pear.horde.org/Horde_Stream_Wrapper) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Stream_Wrapper) >= 2.0.0
Requires: php-pear(PEAR) >= 1.7.0
-Requires: php-channel(pear.horde.org)
+Requires: php-channel(%{pear_channel})
Requires: php-common >= 5.3.0
Requires: php-date php-pcre php-spl
-Provides: php-pear(pear.horde.org/%{pear_name}) = %{version}
+Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
%description
Support classes not tied to Horde but is used by it. These classes can be
@@ -36,10 +44,6 @@ used outside of Horde as well.
[ -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}
%build
@@ -48,7 +52,7 @@ 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 $RPM_BUILD_ROOT %{name}.xml
# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
@@ -57,6 +61,19 @@ rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{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 \
%{pear_xmldir}/%{name}.xml >/dev/null || :
@@ -64,7 +81,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
@@ -74,6 +91,10 @@ fi
%{pear_testdir}/%{pear_name}
%changelog
+* Wed Jan 30 2013 Remi Collet <remi at fedoraproject.org> - 2.0.3-1
+- Update to 2.0.3
+- add option to run tests
+
* Wed Dec 12 2012 Nick Bebout <nb at fedoraproject.org> - 2.0.2-1
- Update to 2.0.2
diff --git a/sources b/sources
index cef929d..5f90577 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4699d1d602e919473dd4f5b0110b13f4 Horde_Support-2.0.2.tgz
+ba00ca9071309459030d7cf7f8f35633 Horde_Support-2.0.3.tgz
More information about the scm-commits
mailing list