From 3f4303fac179113cbb2e01993c43aceba4a6a4ce Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 18 Nov 2019 14:39:41 +0100 Subject: - Fix FTBFS from Koschei, add patch for PHP 7.4 from https://github.com/horde/Service_Weather/pull/1 - use range dependencies --- php-horde-Horde-Service-Weather.spec | 62 +++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 25 deletions(-) (limited to 'php-horde-Horde-Service-Weather.spec') diff --git a/php-horde-Horde-Service-Weather.spec b/php-horde-Horde-Service-Weather.spec index a294c2d..23fb5d1 100644 --- a/php-horde-Horde-Service-Weather.spec +++ b/php-horde-Horde-Service-Weather.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-horde-Horde-Service-Weather # -# Copyright (c) 2012-2017 Remi Collet +# Copyright (c) 2012-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -12,15 +12,15 @@ Name: php-horde-Horde-Service-Weather Version: 2.5.4 -Release: 1%{?dist} +Release: 7%{?dist} Summary: Horde Weather Provider -Group: Development/Libraries License: BSD URL: http://%{pear_channel} Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: https://patch-diff.githubusercontent.com/raw/horde/Service_Weather/pull/1.patch + BuildArch: noarch BuildRequires: gettext BuildRequires: php(language) >= 5.3.0 @@ -28,11 +28,21 @@ BuildRequires: php-pear(PEAR) BuildRequires: php-channel(%{pear_channel}) BuildRequires: php-pear(%{pear_channel}/Horde_Role) >= 1.0.0 # To run unit tests +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-pear(%{pear_channel}/Horde_Date) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Date) < 3) +BuildRequires: (php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Exception) < 3) +BuildRequires: (php-pear(%{pear_channel}/Horde_Http) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Http) < 3) +BuildRequires: (php-pear(%{pear_channel}/Horde_Translation) >= 2.2.0 with php-pear(%{pear_channel}/Horde_Translation) < 3) +BuildRequires: (php-pear(%{pear_channel}/Horde_Url) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Url) < 3) +BuildRequires: (php-pear(%{pear_channel}/Horde_Serialize) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Serialize) < 3) +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_Date) >= 2.0.0 BuildRequires: php-pear(%{pear_channel}/Horde_Http) >= 2.0.0 BuildRequires: php-pear(%{pear_channel}/Horde_Serialize) >= 2.0.0 BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 BuildRequires: php-pear(%{pear_channel}/Horde_Url) >= 2.0.0 +%endif Requires(post): %{__pear} Requires(postun): %{__pear} @@ -44,6 +54,15 @@ Requires: php-spl Requires: php-pear(PEAR) >= 1.7.0 Requires: php-channel(%{pear_channel}) Requires: php-pear(%{pear_channel}/Horde_Role) >= 1.0.0 +%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_Http) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Http) < 3) +Requires: (php-pear(%{pear_channel}/Horde_Translation) >= 2.2.0 with php-pear(%{pear_channel}/Horde_Translation) < 3) +Requires: (php-pear(%{pear_channel}/Horde_Url) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Url) < 3) +# Not documented, detected by phpci +Requires: (php-pear(%{pear_channel}/Horde_Serialize) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Serialize) < 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 @@ -57,6 +76,7 @@ Requires: php-pear(%{pear_channel}/Horde_Url) < 3.0.0 # Not documented, detected by phpci Requires: php-pear(%{pear_channel}/Horde_Serialize) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Serialize) < 3.0.0 +%endif Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} Provides: php-composer(horde/horde-service-weather) = %{version} @@ -72,12 +92,14 @@ WorldWeatherOnline, and Google Weather. %setup -q -c cd %{pear_name}-%{version} +%patch0 -p1 -b .pr1 # Don't install .po and .pot files # Remove checksum for .mo, as we regenerate them sed -e '/%{pear_name}.po/d' \ -e '/Horde_Other.po/d' \ -e '/%{pear_name}.mo/s/md5sum="[^"]*"//' \ + -e '/.php/s/md5sum="[^"]*"//' \ ../package.xml >%{name}.xml touch -r ../package.xml %{name}.xml @@ -93,7 +115,6 @@ done %install -rm -rf %{buildroot} cd %{pear_name}-%{version} %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml @@ -116,28 +137,15 @@ done | tee ../%{pear_name}.lang %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 php71 php72 php73 php74; do + if which $cmd; then + $cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose . || ret=1 + fi +done exit $ret -%clean -rm -rf %{buildroot} - - %post %{__pear} install --nodeps --soft --force --register-only \ %{pear_xmldir}/%{name}.xml >/dev/null || : @@ -150,7 +158,6 @@ fi %files -f %{pear_name}.lang -%defattr(-,root,root,-) %doc %{pear_docdir}/%{pear_name} %{pear_xmldir}/%{name}.xml %dir %{pear_phpdir}/Horde/Service @@ -159,12 +166,17 @@ fi %dir %{pear_datadir}/%{pear_name} %dir %{pear_datadir}/%{pear_name}/locale %{pear_datadir}/%{pear_name}/migration -%{pear_testdir}/%{pear_name} +%doc %{pear_testdir}/%{pear_name} %{pear_hordedir}/themes %{_bindir}/horde-service-weather-metar-database %changelog +* Mon Nov 18 2019 Remi Collet - 2.5.4-7 +- Fix FTBFS from Koschei, add patch for PHP 7.4 from + https://github.com/horde/Service_Weather/pull/1 +- use range dependencies + * Mon Feb 27 2017 Remi Collet - 2.5.4-1 - Update to 2.5.4 -- cgit