summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-solarium.spec43
1 files changed, 28 insertions, 15 deletions
diff --git a/php-solarium.spec b/php-solarium.spec
index 0a65b0b..c1f5cc7 100644
--- a/php-solarium.spec
+++ b/php-solarium.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-solarium
#
-# Copyright (c) 2013-2017 Remi Collet
+# Copyright (c) 2013-2019 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -15,45 +15,52 @@
Name: php-%{gh_project}
Summary: Solarium PHP Solr client library
Version: 3.8.1
-Release: 4%{?dist}
+Release: 9%{?dist}
URL: http://www.solarium-project.org/
License: BSD
-Group: Development/Libraries
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
Source1: %{name}-autoload.php
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: %{name}-php74.patch
+
BuildArch: noarch
%if %{with_tests}
# For tests
BuildRequires: php(language) >= 5.3.2
-BuildRequires: php-composer(symfony/event-dispatcher) < 4
-BuildRequires: php-composer(symfony/event-dispatcher) > 2.3
-BuildRequires: php-composer(fedora/autoloader)
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(symfony/event-dispatcher) > 2.3 with php-composer(symfony/event-dispatcher) < 4)
# From composer.json, "require-dev": {
# "phpunit/phpunit": "~3.7",
# "squizlabs/php_codesniffer": "~1.4",
# "zendframework/zendframework1": "~1.12",
# "satooshi/php-coveralls": "~1.0",
# "guzzlehttp/guzzle": "^3.8 || ^6.2"
-BuildRequires: php-composer(phpunit/phpunit) >= 3.7
-%if 0%{?fedora}
-BuildRequires: php-guzzlehttp-guzzle6 >= 6.2
+BuildRequires: (php-composer(guzzlehttp/guzzle) > 6.2 with php-composer(guzzlehttp/guzzle) < 7)
+# remirepo:4
%else
+BuildRequires: php-symfony-event-dispatcher > 2.3
BuildRequires: php-guzzle-Guzzle >= 3.8
%endif
+BuildRequires: php-composer(fedora/autoloader)
+BuildRequires: php-composer(phpunit/phpunit) >= 3.7
%endif
# From composer.json, "require": {
# "php": ">=5.3.2",
# "symfony/event-dispatcher": "~2.3|~3.0"
Requires: php(language) >= 5.3.2
-Requires: php-composer(symfony/event-dispatcher) < 4
-Requires: php-composer(symfony/event-dispatcher) > 2.3
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(symfony/event-dispatcher) > 2.3 with php-composer(symfony/event-dispatcher) < 4)
+# remirepo:3
+%else
+Requires: php-symfony-event-dispatcher > 2.3
+%endif
# From composer.json, "suggest": {
# "minimalcode/search": "Query builder compatible with Solarium, allows simplified solr-query handling"
-%if 0%{?fedora}> 21
+%if 0%{?fedora}> 21 || 0%{?rhel} >= 8
Suggests: php-composer(minimalcode/search)
%endif
# From phpcompatinfo report for version 3.7.0
@@ -83,6 +90,7 @@ Documentation: http://wiki.solarium-project.org/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p0
rm examples/.gitignore
@@ -115,7 +123,7 @@ EOF
: Run upstream test suite against installed library
ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php71 php72 php73 php74; do
if which $cmd; then
$cmd %{_bindir}/phpunit || ret=1
fi
@@ -127,7 +135,7 @@ exit $ret
%files
-%defattr(-,root,root,-)
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc composer.json *.md examples
@@ -135,6 +143,11 @@ exit $ret
%changelog
+* Wed Oct 16 2019 Remi Collet <remi@remirepo.net> - 3.8.1-9
+- use range dependency
+- add patch for PHP 7.4 from
+ https://github.com/solariumphp/solarium/pull/711
+
* Thu Oct 5 2017 Remi Collet <remi@remirepo.net> - 3.8.1-4
- fix autoloader for Symfony 3, FTBFS from Koschei