From a9b085891fb4c088ffb2d675952c60498d4ed7aa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Feb 2021 08:30:37 +0100 Subject: update to 2.4.1 use weak and range dependencies --- .gitignore | 9 +++++++++ php-horde-Horde-Db.spec | 44 ++++++++++++++++++++++++++------------------ 2 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/php-horde-Horde-Db.spec b/php-horde-Horde-Db.spec index 8cd38e6..c308e71 100644 --- a/php-horde-Horde-Db.spec +++ b/php-horde-Horde-Db.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-horde-Horde-Db # -# Copyright (c) 2012-2017 Nick Bebout, Remi Collet +# Copyright (c) 2012-2021 Nick Bebout, Remi Collet # # License: MIT # https://fedoraproject.org/wiki/Licensing:MIT#Modern_Style_with_sublicense @@ -12,7 +12,7 @@ %global pear_channel pear.horde.org Name: php-horde-Horde-Db -Version: 2.4.0 +Version: 2.4.1 Release: 1%{?dist} Summary: Horde Database Libraries @@ -21,14 +21,18 @@ License: BSD URL: http://pear.horde.org 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}) # To run unit tests +%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) +BuildRequires: (php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Cache) < 3) +%else BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 BuildRequires: php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0 +%endif Requires(post): %{__pear} Requires(postun): %{__pear} @@ -39,6 +43,15 @@ Requires: php-pcre Requires: php-spl Requires: php-pear(PEAR) >= 1.7.0 Requires: php-channel(%{pear_channel}) +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-pear(%{pear_channel}/Horde_Date) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Date) < 3) +Requires: (php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Exception) < 3) +Requires: (php-pear(%{pear_channel}/Horde_Support) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Support) < 3) +Requires: (php-pear(%{pear_channel}/Horde_Util) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Util) < 3) +# Optional +Recommends: (php-pear(%{pear_channel}/Horde_Autoloader) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Autoloader) < 3) +Recommends: (php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Cache) < 3) +%else Requires: php-pear(%{pear_channel}/Horde_Date) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Date) < 3.0.0 Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0 @@ -52,6 +65,7 @@ Requires: php-pear(%{pear_channel}/Horde_Autoloader) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Autoloader) < 3.0.0 Requires: php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Cache) < 3.0.0 +%endif Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} Provides: php-composer(horde/horde-db) = %{version} @@ -88,21 +102,12 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} %check cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) -# remirepo:11 -run=0 ret=0 -if which php56; then - php56 %{_bindir}/phpunit . || ret=1 - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit . || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --verbose . -# remirepo:2 -fi +for cmd in php php72 php73 php74; do + if which $cmd; then + $cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose . || ret=1 + fi +done exit $ret @@ -118,7 +123,6 @@ fi %files -%defattr(-,root,root,-) %doc %{pear_docdir}/%{pear_name} %{pear_xmldir}/%{name}.xml %{pear_phpdir}/Horde/Db @@ -128,6 +132,10 @@ fi %changelog +* Wed Feb 24 2021 Remi Collet - 2.4.1-1 +- update to 2.4.1 +- use weak and range dependencies + * Mon Feb 27 2017 Remi Collet - 2.4.0-1 - Update to 2.4.0 -- cgit