# remirepo spec file for php-opencloud-openstack, from: # # Fedora spec file for php-opencloud-openstack # # Copyright (c) 2013-2017 Gregor Tätzner # Shawn Iwinski # Christian Glombek # # License: MIT # http://opensource.org/licenses/MIT # # Please preserve changelog entries # %global github_owner php-opencloud %global github_name openstack %global github_version 3.0.5 %global github_commit 2883c92cdfe05d4a11533497c2b74cc018c7cf0b %global composer_vendor php-opencloud %global composer_project openstack # "php" : "~7.0" %global php_min_ver 7.0 # "guzzlehttp/http" : "~6.1" %global guzzle_min_ver 6.1 %global guzzle_max_ver 7 # "justinrainbow/json-schema": "~5.2" %global json_schema_min_ver 5.2 %global json_schema_max_ver 6 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-opencloud-openstack Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: PHP SDK for OpenStack clouds License: ASL 2.0 URL: https://php-openstack-sdk.readthedocs.io/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz 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 %endif # Tests %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 %endif # 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 # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} %description php-opencloud/openstack is an SDK which allows PHP developers to easily connect to OpenStack APIs in a simple and idiomatic way. This binding is specifically designed for OpenStack APIs, but other provider SDKs are available. Multiple OpenStack services, and versions of services, are supported. Autoloader: %{phpdir}/OpenStack/autoload.php %package doc Summary: Documentation for PHP SDK for OpenStack clouds %description doc Documentation for PHP SDK for OpenStack clouds %prep %setup -qn %{github_name}-%{github_commit} %build %if %{with_docs} # Generate html docs PYTHONPATH=${PWD} sphinx-build-3 doc html # Remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} # Unbundle fonts pushd html/_static/fonts/ for file in FontAwesome*; do rm -f $file ln -s /usr/share/fonts/fontawesome/$file $file done for file in fontawesome*; do rm -f $file ln -s /usr/share/fonts/fontawesome/$file $file done 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 ln -s /usr/share/fonts/levien-inconsolata/$file $file done %endif popd %endif : Create autoloader cat <<'AUTOLOAD' | tee src/autoload.php - 3.0.5-1 - backport for remirepo * Sun Jul 01 2018 Christian Glombek - 3.0.5-1 - Update to version 3.0.5 - Rename to php-opencloud-openstack * Fri Feb 09 2018 Fedora Release Engineering - 1.16.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Nov 2 2017 Remi Collet - 1.16.0-4 - fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/mikemccabe/json-patch-php/pull/17 * Thu Jul 27 2017 Fedora Release Engineering - 1.16.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon May 29 2017 Shawn Iwinski - 1.16.0-2 - Fix autoloader dependency * Sun Feb 26 2017 Shawn Iwinski - 1.16.0-1 - Update to 1.16.0 (RHBZ #1312624) - Fix FTBFS (skip tests known to fail) - Add bundled dependency php-composer(mikemccabe/json-patch-php) - Use php-composer(fedora/autoloader) * Sat Feb 11 2017 Fedora Release Engineering - 1.12.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sat Mar 26 2016 Shawn Iwinski - 1.12.2-1 - Updated to 1.12.2 - Updated URL - Updated dependencies to use php-composer(*) - Added autoloader (and bumped dependency versions for their autoloaders) * Thu Feb 04 2016 Fedora Release Engineering - 1.12.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 1.12.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Jan 02 2015 Shawn Iwinski - 1.12.1-1 - Updated to 1.12.1 (BZ #1172637) - Added php-composer(rackspace/php-opencloud) virtual provide * Sat Nov 22 2014 Shawn Iwinski - 1.11.0-3 - Removed obsolete of php-cloudfiles * Sun Nov 02 2014 Shawn Iwinski - 1.11.0-2 - No BuildRequires unless with tests * Sun Nov 02 2014 Shawn Iwinski - 1.11.0-1 - Updated to 1.11.0 (BZ #1159522) - Spec cleanup * Sat Jun 07 2014 Fedora Release Engineering - 1.6.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Jan 30 2014 Gregor Tätzner - 1.6.0-4 - obsolete php-cloudfiles * Sat Jan 25 2014 Gregor Tätzner - 1.6.0-3 - use commit revision in source url * Fri Jan 03 2014 Gregor Tätzner - 1.6.0-2 - move lib to psr-0 compliant location - drop autoloader * Tue Dec 31 2013 Gregor Tätzner - 1.6.0-1 - initial packaging