diff options
author | Remi Collet <remi@remirepo.net> | 2017-12-13 11:40:08 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-12-13 11:40:08 +0100 |
commit | d746704565997cd573429b14dc08e4267e488498 (patch) | |
tree | f75026cff475cc3348f62273b3920cd780b3ef92 /php-zendframework-zend-mvc-plugins.spec | |
parent | dfc0fd94ad189df110ad21fa7e29af63728f3083 (diff) |
Diffstat (limited to 'php-zendframework-zend-mvc-plugins.spec')
-rw-r--r-- | php-zendframework-zend-mvc-plugins.spec | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/php-zendframework-zend-mvc-plugins.spec b/php-zendframework-zend-mvc-plugins.spec index b34f4dc..4165d53 100644 --- a/php-zendframework-zend-mvc-plugins.spec +++ b/php-zendframework-zend-mvc-plugins.spec @@ -10,10 +10,12 @@ %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner zendframework %global gh_project zend-mvc-plugins +%global php_home %{_datadir}/php +%global library Plugin Name: php-%{gh_owner}-%{gh_project} Version: 1.0.1 -Release: 2%{?dist} +Release: 5%{?dist} Summary: Zend Framework Mvc-Plugins component Group: Development/Libraries @@ -22,6 +24,12 @@ URL: https://framework.zend.com/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch +# For test +BuildRequires: php-cli +BuildRequires: php-autoloader(%{gh_owner}/zend-mvc-plugin-fileprg) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-mvc-plugin-flashmessenger) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-mvc-plugin-identity) >= 1.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-mvc-plugin-prg) >= 1.0 # From composer, "require": { # "php": "^5.6 || ^7.0", @@ -30,16 +38,17 @@ BuildArch: noarch # "zendframework/zend-mvc-plugin-identity": "^1.0", # "zendframework/zend-mvc-plugin-prg": "^1.0" Requires: php(language) >= 5.6 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-fileprg) >= 1.0 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-fileprg) < 2 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-flashmessenger) >= 1.0 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-flashmessenger) < 2 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-identity) >= 1.0 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-identity) < 2 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-prg) >= 1.0 -Requires: php-composer(%{gh_owner}/zend-mvc-plugin-prg) < 2 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-fileprg) >= 1.0 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-fileprg) < 2 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-flashmessenger) >= 1.0 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-flashmessenger) < 2 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-identity) >= 1.0 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-identity) < 2 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-prg) >= 1.0 +Requires: php-autoloader(%{gh_owner}/zend-mvc-plugin-prg) < 2 Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -60,11 +69,26 @@ mv LICENSE.md LICENSE %build -# Empty build section, nothing required +: Create autoloader +cat << 'EOF' | tee autoload.php +<?php +require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/Zend/Mvc/Plugin/FilePrg/autoload.php', + '%{php_home}/Zend/Mvc/Plugin/FlashMessenger/autoload.php', + '%{php_home}/Zend/Mvc/Plugin/Identity/autoload.php', + '%{php_home}/Zend/Mvc/Plugin/Prg/autoload.php', +]); +EOF %install -# Nothing +install -Dpm 644 autoload.php %{buildroot}%{php_home}/Zend/Mvc/%{library}/autoload.php + + +%check +: Ensure autoloader works +php -r 'require "%{buildroot}%{php_home}/Zend/Mvc/%{library}/autoload.php";' %files @@ -72,9 +96,13 @@ mv LICENSE.md LICENSE %license LICENSE %doc *.md %doc composer.json +%{php_home}/Zend/Mvc/%{library}/autoload.php %changelog +* Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 1.0.1-5 +- switch to fedora/autoloader + * Tue Jul 26 2016 Remi Collet <remi@fedoraproject.org> - 1.0.1-2 - fix summary and description |