summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--php-horde-Horde-Text-Diff.spec51
2 files changed, 41 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/php-horde-Horde-Text-Diff.spec b/php-horde-Horde-Text-Diff.spec
index e854e17..cde1ca4 100644
--- a/php-horde-Horde-Text-Diff.spec
+++ b/php-horde-Horde-Text-Diff.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-horde-Horde-Text-Diff
#
-# Copyright (c) 2012-2017 Nick Bebout, Remi Collet
+# Copyright (c) 2012-2019 Nick Bebout, Remi Collet
#
# License: MIT
# https://fedoraproject.org/wiki/Licensing:MIT#Modern_Style_with_sublicense
@@ -10,24 +10,29 @@
%{!?__pear: %global __pear %{_bindir}/pear}
%global pear_name Horde_Text_Diff
%global pear_channel pear.horde.org
+%global with_tests 0%{!?_without_tests:1}
Name: php-horde-Horde-Text-Diff
-Version: 2.2.0
+Version: 2.2.1
Release: 1%{?dist}
Summary: Engine for performing and rendering text diffs
-Group: Development/Libraries
License: LGPLv2
URL: http://%{pear_channel}
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
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
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 with php-pear(%{pear_channel}/Horde_Test) < 3)
+%else
+BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
+%endif
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -35,10 +40,15 @@ Requires: php(language) >= 5.3.0
Requires: php-pcre
Requires: php-pear(PEAR) >= 1.7.0
Requires: php-channel(%{pear_channel})
-Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Exception) < 3)
+Requires: (php-pear(%{pear_channel}/Horde_Util) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Util) < 3)
+%else
Requires: php-pear(%{pear_channel}/Horde_Exception) < 3.0.0
-Requires: php-pear(%{pear_channel}/Horde_Util) >= 2.0.0
-Requires: php-pear(%{pear_channel}/Horde_Util) < 3.0.0
+Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0
+Requires: php-pear(%{pear_channel}/Horde_Util) < 3.0.0
+Requires: php-pear(%{pear_channel}/Horde_Util) >= 2.0.0
+%endif
# Optional but not yet available : php-pecl-xdiff
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
@@ -62,7 +72,6 @@ cd %{pear_name}-%{version}
%install
-rm -rf %{buildroot}
cd %{pear_name}-%{version}
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
@@ -75,16 +84,19 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
%check
+%if %{with_tests}
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
-%{_bindir}/phpunit .
-
-if which php70; then
- php70 %{_bindir}/phpunit .
-fi
-
-%clean
-rm -rf %{buildroot}
+ret=0
+for cmd in php php71 php72 php73 php74; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose . || ret=1
+ fi
+done
+exit $ret
+%else
+: bootstrap build with test suite disabled
+%endif
%post
@@ -99,7 +111,6 @@ fi
%files
-%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%dir %{pear_phpdir}/Horde/Text
@@ -109,6 +120,10 @@ fi
%changelog
+* Mon Sep 30 2019 Remi Collet <remi@remirepo.net> - 2.2.1-1
+- update to 2.2.1
+- use range dependencies
+
* Mon Mar 20 2017 Remi Collet <remi@remirepo.net> - 2.2.0-1
- Update to 2.2.0