summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-soap.spec63
1 files changed, 39 insertions, 24 deletions
diff --git a/php-zendframework-zend-soap.spec b/php-zendframework-zend-soap.spec
index e28fae7..ff378f1 100644
--- a/php-zendframework-zend-soap.spec
+++ b/php-zendframework-zend-soap.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.6.0
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -40,20 +40,20 @@ BuildRequires: php-libxml
BuildRequires: php-pcre
BuildRequires: php-soap
BuildRequires: php-spl
-BuildRequires: php-composer(%{gh_owner}/zend-server) >= 2.6.1
-BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
-BuildRequires: php-composer(%{gh_owner}/zend-uri) >= 2.5.2
+BuildRequires: php-autoloader(%{gh_owner}/zend-server) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+BuildRequires: php-autoloader(%{gh_owner}/zend-uri) >= 2.5.2
# From composer, "require-dev": {
# "zendframework/zend-config": "^2.6",
# "zendframework/zend-http": "^2.5.4",
# "phpunit/PHPUnit": "^4.8",
# "squizlabs/php_codesniffer": "^2.3.1"
-BuildRequires: php-composer(%{gh_owner}/zend-config) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.5.4
+BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
BuildRequires: php-composer(phpunit/phpunit) >= 4.8
-# Autoloader
-BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.5 || ^7.0",
@@ -62,18 +62,20 @@ BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
# "zendframework/zend-uri": "^2.5.2"
Requires: php(language) >= 5.5
%if ! %{bootstrap}
-Requires: php-composer(%{gh_owner}/zend-server) >= 2.6.1
-Requires: php-composer(%{gh_owner}/zend-server) < 3
-Requires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
-Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
-Requires: php-composer(%{gh_owner}/zend-uri) >= 2.5.2
-Requires: php-composer(%{gh_owner}/zend-uri) < 3
+Requires: php-autoloader(%{gh_owner}/zend-server) >= 2.6.1
+Requires: php-autoloader(%{gh_owner}/zend-server) < 3
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
+Requires: php-autoloader(%{gh_owner}/zend-uri) >= 2.5.2
+Requires: php-autoloader(%{gh_owner}/zend-uri) < 3
# From composer, "suggest": {
# "zendframework/zend-http": "Zend\\Http component"
%if 0%{?fedora} >= 21
-Suggests: php-composer(%{gh_owner}/zend-http)
+Suggests: php-autoloader(%{gh_owner}/zend-http)
%endif
%endif
+# Autoloader
+Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 2.5.1
Requires: php-curl
Requires: php-dom
@@ -85,6 +87,7 @@ Requires: php-spl
Obsoletes: php-ZendFramework2-%{library} < 2.5
Provides: php-ZendFramework2-%{library} = %{version}
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
%description
@@ -101,7 +104,17 @@ mv LICENSE.md LICENSE
%build
-# Empty build section, nothing required
+phpab --template fedora --output src/autoload.php src
+cat << 'EOF' | tee -a src/autoload.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Zend/Server/autoload.php',
+ '%{php_home}/Zend/Stdlib/autoload.php',
+ '%{php_home}/Zend/Uri/autoload.php',
+]);
+\Fedora\Autoloader\Dependencies::optional([
+ '%{php_home}/Zend/Http/autoload.php',
+]);
+EOF
%install
@@ -114,14 +127,13 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
-Zend\Loader\AutoloaderFactory::factory(array(
- 'Zend\Loader\StandardAutoloader' => array(
- 'namespaces' => array(
- 'ZendTest\\%{library}' => dirname(__DIR__).'/test/',
- 'Zend\\%{library}' => '%{buildroot}%{php_home}/Zend/%{library}'
-))));
-require_once '%{php_home}/Zend/autoload.php';
+require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Zend/Config/autoload.php',
+ '%{php_home}/Zend/Http/autoload.php',
+]);
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
+
require_once 'test/TestAsset/commontypes.php';
require_once 'test/TestAsset/call_user_func.php';
EOF
@@ -147,6 +159,9 @@ exit $ret
%changelog
+* Mon Dec 11 2017 Remi Collet <remi@remirepo.net> - 2.6.0-4
+- switch from zend-loader to fedora/autoloader
+
* Fri Apr 22 2016 Remi Collet <remi@fedoraproject.org> - 2.6.0-1
- update to 2.6.0
- raise dependency on PHP >= 5.5