summaryrefslogtreecommitdiffstats
path: root/php-opencloud-openstack.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-opencloud-openstack.spec')
-rw-r--r--php-opencloud-openstack.spec34
1 files changed, 33 insertions, 1 deletions
diff --git a/php-opencloud-openstack.spec b/php-opencloud-openstack.spec
index 20d66be..8813362 100644
--- a/php-opencloud-openstack.spec
+++ b/php-opencloud-openstack.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-opencloud-openstack, from:
#
# Fedora spec file for php-opencloud-openstack
#
@@ -45,16 +46,25 @@ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{gith
BuildArch: noarch
# Docs
+%if 0%{?fedora} >= 29
+%global with_docs 1
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(sphinxcontrib-phpdomain)
+%else
+%global with_docs 0
+%endif
BuildRequires: fontawesome-fonts
Requires: fontawesome-fonts
+%if 0%{?fedora} >= 25
BuildRequires: fontawesome-fonts-web
Requires: fontawesome-fonts-web
+%endif
BuildRequires: lato-fonts
Requires: lato-fonts
+%if 0%{?fedora} >= 25 || 0%{?rhel} >= 7
BuildRequires: google-roboto-slab-fonts
Requires: google-roboto-slab-fonts
+%endif
%if 0%{?fedora} >= 29
BuildRequires: levien-inconsolata-fonts
Requires: levien-inconsolata-fonts
@@ -64,8 +74,13 @@ Requires: levien-inconsolata-fonts
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-guzzlehttp-guzzle6 >= %{guzzle_min_ver} with php-guzzlehttp-guzzle6 < %{guzzle_max_ver})
BuildRequires: (php-justinrainbow-json-schema5 >= %{json_schema_min_ver} with php-justinrainbow-json-schema5 < %{json_schema_max_ver})
+%else
+BuildRequires: php-guzzlehttp-guzzle6 >= %{guzzle_min_ver}
+BuildRequires: php-justinrainbow-json-schema5 >= %{json_schema_min_ver}
+%endif
BuildRequires: phpunit6
## Autoloader
BuildRequires: php-fedora-autoloader
@@ -73,8 +88,13 @@ BuildRequires: php-fedora-autoloader
# composer.json
Requires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-guzzlehttp-guzzle6 >= %{guzzle_min_ver} with php-guzzlehttp-guzzle6 < %{guzzle_max_ver})
Requires: (php-justinrainbow-json-schema5 >= %{json_schema_min_ver} with php-justinrainbow-json-schema5 < %{json_schema_max_ver})
+%else
+Requires: php-guzzlehttp-guzzle6 >= %{guzzle_min_ver}
+Requires: php-justinrainbow-json-schema5 >= %{json_schema_min_ver}
+%endif
# Autoloader
Requires: php-fedora-autoloader
@@ -103,6 +123,7 @@ Documentation for PHP SDK for OpenStack clouds
%build
+%if %{with_docs}
# Generate html docs
PYTHONPATH=${PWD} sphinx-build-3 doc html
# Remove the sphinx-build leftovers
@@ -121,10 +142,12 @@ for file in Lato*; do
rm -f $file
ln -s /usr/share/fonts/lato/$file $file
done
+%if 0%{?fedora} >= 24 || 0%{?rhel} >= 7
for file in RobotoSlab*; do
rm -f $file
ln -s /usr/share/fonts/google-roboto-slab/$file $file
done
+%endif
%if 0%{?fedora} >= 29
for file in Inconsolata*; do
rm -f $file
@@ -132,6 +155,7 @@ for file in Inconsolata*; do
done
%endif
popd
+%endif
: Create autoloader
cat <<'AUTOLOAD' | tee src/autoload.php
@@ -169,7 +193,12 @@ require '%{buildroot}%{phpdir}/OpenStack/autoload.php';
AUTOLOAD
: Upstream tests
-%{_bindir}/phpunit6 --verbose
+for cmd in php php70 php71 php72 php73
+do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit6 --verbose
+ fi
+done
%else
: Tests skipped
%endif
@@ -189,6 +218,9 @@ AUTOLOAD
%changelog
+* Fri Jul 6 2018 Remi Collet <remi@remirepo.net> - 3.0.5-1
+- backport for remirepo
+
* Sun Jul 01 2018 Christian Glombek <lorbus@fedoraproject.org> - 3.0.5-1
- Update to version 3.0.5
- Rename to php-opencloud-openstack