# remirepo/Fedora spec file for php-zendframework-zend-expressive-zendviewrenderer # # Copyright (c) 2016-2017 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global bootstrap 0 %global gh_commit 6524aff83227a6cfb3589f2fd0c23ae6116fa3f8 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner zendframework %global gh_project zend-expressive-zendviewrenderer %global php_home %{_datadir}/php %global library Expressive %global sublib ZendView %if %{bootstrap} %global with_tests 0%{?_with_tests:1} %else %global with_tests 0%{!?_without_tests:1} %endif Name: php-%{gh_owner}-%{gh_project} Version: 1.4.1 Release: 1%{?dist} Summary: zend-view PhpRenderer integration for Expressive Group: Development/Libraries License: BSD URL: https://zendframework.github.io/zend-expressive/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh BuildArch: noarch # Tests %if %{with_tests} BuildRequires: php(language) >= 5.6 BuildRequires: php-composer(psr/http-message) >= 1.0 BuildRequires: php-pcre BuildRequires: php-spl BuildRequires: php-composer(container-interop/container-interop) >= 1.2 BuildRequires: php-composer(psr/http-message) >= 1.0.1 BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-helpers) >= 1.4 BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.3.2 BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.1 BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6.1 BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.6 BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.8 BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.8.1 # not in composer.json (dev dep of zend-expressive-helpers) BuildRequires: php-autoloader(%{gh_owner}/zend-diactoros) # From composer, "require-dev": { # "malukenho/docheader": "^0.1.5", # "phpunit/phpunit": "^5.7.23 || ^6.4.3", # "zendframework/zend-coding-standard": "~1.0.0" %if 0%{?fedora} >= 26 %global phpunit %{_bindir}/phpunit6 %else %global phpunit %{_bindir}/phpunit %endif BuildRequires: %{phpunit} %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", # "container-interop/container-interop": "^1.2", # "psr/http-message": "^1.0.1", # "zendframework/zend-expressive-helpers": "^1.4 || ^2.2 || ^3.0.1 || ^4.0", # "zendframework/zend-expressive-router": "^1.3.2 || ^2.1", # "zendframework/zend-expressive-template": "^1.0.4", # "zendframework/zend-servicemanager": "^2.7.8 || ^3.3", # "zendframework/zend-view": "^2.8.1" Requires: php(language) >= 5.6 Requires: php-composer(container-interop/container-interop) >= 1.2 Requires: php-composer(container-interop/container-interop) < 2 Requires: php-composer(psr/http-message) >= 1.0.1 Requires: php-composer(psr/http-message) < 2 Requires: php-autoloader(%{gh_owner}/zend-expressive-helpers) >= 1.4 Requires: php-autoloader(%{gh_owner}/zend-expressive-helpers) < 5 Requires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 1.3.2 Requires: php-autoloader(%{gh_owner}/zend-expressive-router) < 3 Requires: php-autoloader(%{gh_owner}/zend-expressive-template) >= 1.0.4 Requires: php-autoloader(%{gh_owner}/zend-expressive-template) < 2 Requires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6.1 Requires: php-autoloader(%{gh_owner}/zend-filter) < 3 Requires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.6 Requires: php-autoloader(%{gh_owner}/zend-i18n) < 3 Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.8 Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4 Requires: php-autoloader(%{gh_owner}/zend-view) >= 2.8.1 Requires: php-autoloader(%{gh_owner}/zend-view) < 3 # Autoloader Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 1.1.0 Requires: php-pcre Requires: php-spl Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description zend-view PhpRenderer integration for Expressive. %prep %setup -q -n %{gh_project}-%{gh_commit} mv LICENSE.md LICENSE %build : Create autoloader phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ '%{php_home}/Interop/Container/autoload.php', '%{php_home}/Psr/Http/Message/autoload.php', '%{php_home}/Zend/Expressive/Helper/autoload.php', '%{php_home}/Zend/Expressive/Router/autoload.php', '%{php_home}/Zend/Expressive/Template/autoload.php', '%{php_home}/Zend/Filter/autoload.php', '%{php_home}/Zend/I18n/autoload.php', '%{php_home}/Zend/ServiceManager/autoload.php', '%{php_home}/Zend/View/autoload.php', ]); EOF %install mkdir -p %{buildroot}%{php_home}/Zend/%{library} cp -pr src %{buildroot}%{php_home}/Zend/%{library}/%{sublib} %check %if %{with_tests} mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 1.4.1-1 - Update to 1.4.1 * Tue Dec 12 2017 Remi Collet - 1.4.0-3 - switch from zend-loader to fedora/autoloader * Wed Mar 15 2017 Remi Collet - 1.4.0-1 - Update to 1.4.0 - use phpunit6 on F26+ * Fri Mar 3 2017 Remi Collet - 1.3.0-1 - Update to 1.3.0 - raise dependency on container-interop/container-interop 1.2 - raise dependency on psr/http-message 1.0.1 - raise dependency on zend-expressive-helpers 1.4 - raise dependency on zend-servicemanager 2.7.8 * Fri Jan 13 2017 Remi Collet - 1.2.1-1 - update to 1.2.1 * Wed Jan 11 2017 Remi Collet - 1.2.0-1 - update to 1.2.0 - raise dependency on PHP version 5.6 - allow zend-expressive-helpers version 3.0 - add dependency on zend-expressive-router - raise dependency on zend-expressive-template version 1.0.4 - drop dependency on zend-filter and zend-i18n - raise dependency on zend-view version 2.8.1 * Sat Jul 2 2016 Remi Collet - 1.1.0-1 - initial package