[php-horde-Horde-Log] - Update to 2.1.0 - cleanups - add --with tests option
Remi Collet
remi at fedoraproject.org
Tue Oct 15 13:26:34 UTC 2013
commit 01968623cd90ada558b7ab4d5625a41fb3f8bf37
Author: Remi Collet <remi at fedoraproject.org>
Date: Tue Oct 15 15:26:21 2013 +0200
- Update to 2.1.0
- cleanups
- add --with tests option
.gitignore | 3 ++
php-horde-Horde-Log.spec | 81 ++++++++++++++++++++++++++++++++++-----------
sources | 2 +-
3 files changed, 65 insertions(+), 21 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 32e3a88..4589192 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
+clog
+*spec~
/Horde_Log-2.0.1.tgz
+/Horde_Log-2.1.0.tgz
diff --git a/php-horde-Horde-Log.spec b/php-horde-Horde-Log.spec
index 45e0ce9..b2f0fcd 100644
--- a/php-horde-Horde-Log.spec
+++ b/php-horde-Horde-Log.spec
@@ -1,55 +1,91 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%global pear_name Horde_Log
+%global pear_name Horde_Log
+%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-Log
-Version: 2.0.1
-Release: 4%{?dist}
+Version: 2.1.0
+Release: 1%{?dist}
Summary: Horde Logging library
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(language) >= 5.3.0
BuildRequires: php-pear(PEAR) >= 1.7.0
+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_Constraint) >= 2.0.0
-Requires: php-pear(pear.horde.org/Horde_Exception) >= 2.0.0
+Requires: php(language) >= 5.3.0
+Requires: php-date
+Requires: php-pcre
+Requires: php-reflection
+Requires: php-spl
Requires: php-pear(PEAR) >= 1.7.0
-BuildRequires: php-channel(pear.horde.org)
-Requires: php-channel(pear.horde.org)
-Requires: php-common >= 5.3.0
-Requires: php-dom php-date php-pcre php-reflection php-spl
-BuildRequires: php-simplexml php-libxml
+Requires: php-channel(%{pear_channel})
+Requires: php-pear(%{pear_channel}/Horde_Constraint) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Constraint) < 3.0.0
+Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Exception) < 3.0.0
+# Optional
+Requires: php-dom
+Requires: php-pear(%{pear_channel}/Horde_Cli) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Cli) < 3.0.0
+Requires: php-pear(%{pear_channel}/Horde_Scribe) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Scribe) < 3.0.0
+
+Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
+
%description
Horde Logging package with configurable handlers, filters, and formatting.
%prep
%setup -q -c
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{name}.xml
cd %{pear_name}-%{version}
+mv ../package.xml %{name}.xml
+
%build
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.
+
%install
cd %{pear_name}-%{version}
-%{__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 \
@@ -58,7 +94,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
@@ -70,6 +106,11 @@ fi
%{pear_testdir}/Horde_Log
%changelog
+* Tue Oct 15 2013 Remi Collet <remi at fedoraproject.org> - 2.1.0-1
+- Update to 2.1.0
+- cleanups
+- add --with tests option
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 658fec4..af8675e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ec1e7028a9b6fa2df960b9940fc6785c Horde_Log-2.0.1.tgz
+7326899d5448e8a4385ba30aae680332 Horde_Log-2.1.0.tgz
More information about the scm-commits
mailing list