summaryrefslogtreecommitdiffstats
path: root/php-horde-Horde-History.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-horde-Horde-History.spec')
-rw-r--r--php-horde-Horde-History.spec29
1 files changed, 17 insertions, 12 deletions
diff --git a/php-horde-Horde-History.spec b/php-horde-Horde-History.spec
index 6e570b9..b9e4373 100644
--- a/php-horde-Horde-History.spec
+++ b/php-horde-Horde-History.spec
@@ -13,7 +13,7 @@
Name: php-horde-Horde-History
Version: 2.3.6
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: API for tracking the history of an object
Group: Development/Libraries
@@ -21,7 +21,8 @@ License: LGPLv2
URL: http://%{pear_channel}
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Patch0: https://github.com/horde/History/commit/689a0a89e03786d02718f96db269fc04b5d24d65.patch
+
BuildArch: noarch
BuildRequires: php(language) >= 5.3.0
BuildRequires: php-pear(PEAR) >= 1.7.0
@@ -57,7 +58,9 @@ of data in Horde applications.
%setup -q -c
cd %{pear_name}-%{version}
-mv ../package.xml %{name}.xml
+%patch0 -p1 -b .upstream
+
+sed -e 's/md5sum="[^"]*"//' ../package.xml >%{name}.xml
%build
@@ -66,7 +69,6 @@ cd %{pear_name}-%{version}
%install
-rm -rf %{buildroot}
cd %{pear_name}-%{version}
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
@@ -78,17 +80,18 @@ mkdir -p %{buildroot}%{pear_xmldir}
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
-%clean
-rm -rf %{buildroot}
%check
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
-%{_bindir}/phpunit .
-if which php70; then
- php70 %{_bindir}/phpunit .
-fi
+ret=0
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit . || ret=1
+ fi
+done
+exit $ret
%post
@@ -103,16 +106,18 @@ fi
%files
-%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/Horde/History
%{pear_phpdir}/Horde/History.php
%{pear_datadir}/%{pear_name}
-%{pear_testdir}/%{pear_name}
+%doc %{pear_testdir}/%{pear_name}
%changelog
+* Tue Dec 19 2017 Remi Collet <remi@remirepo.net> - 2.3.6-4
+- Fix FTBFS from Koschei, add upstream patch for PHP 7.2
+
* Tue Feb 02 2016 Remi Collet <remi@fedoraproject.org> - 2.3.6-1
- Update to 2.3.6
- PHP 7 compatible version