summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--php-aws-sdk.spec60
2 files changed, 28 insertions, 39 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/php-aws-sdk.spec b/php-aws-sdk.spec
index cdfc22a..9d1dee5 100644
--- a/php-aws-sdk.spec
+++ b/php-aws-sdk.spec
@@ -46,7 +46,7 @@
Name: php-aws-sdk
Version: %{github_version}
-Release: 1.1%{?dist}
+Release: 3%{?dist}
Summary: Amazon Web Services framework for PHP
Group: Development/Libraries
@@ -54,12 +54,11 @@ License: ASL 2.0
URL: http://aws.amazon.com/sdk-for-php/
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Library version value and autoloader check
BuildRequires: php-cli
BuildRequires: php-composer(guzzle/guzzle) >= %{guzzle_min_ver}
-BuildRequires: php-composer(symfony/class-loader)
+BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
@@ -67,7 +66,7 @@ Requires: php-composer(guzzle/guzzle) >= %{guzzle_min_ver}
Requires: php-composer(guzzle/guzzle) < %{guzzle_max_ver}
# composer.json: optional
Requires: php-openssl
-# phpcompatinfo (computed from version 2.8.30)
+# phpcompatinfo (computed from version 2.8.31)
Requires: php-curl
Requires: php-date
Requires: php-hash
@@ -78,7 +77,7 @@ Requires: php-session
Requires: php-simplexml
Requires: php-spl
# Autoloader
-Requires: php-composer(symfony/class-loader)
+Requires: php-composer(fedora/autoloader)
# Weak dependencies
%if 0%{?fedora} >= 21
@@ -120,35 +119,22 @@ cat <<'AUTOLOAD' | tee src/Aws/autoload.php
* Autoloader for %{name} and its' dependencies
* (created by %{name}-%{version}-%{release}).
*
- * @return \Symfony\Component\ClassLoader\ClassLoader
*/
-if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
- if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
- require_once '%{phpdir}/Symfony/Component/ClassLoader/ClassLoader.php';
- }
-
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
-
-$fedoraClassLoader->addPrefix('Aws\\', dirname(__DIR__));
-
-// Dependencies (autoloader => required)
-foreach(array(
- // Required dependencies
- '%{phpdir}/Guzzle/autoload.php' => true,
- // Optional dependencies
- '%{phpdir}/Doctrine/Common/Cache/autoload.php' => false,
- '%{phpdir}/Monolog/autoload.php' => false,
- '%{phpdir}/Symfony/Component/Yaml/autoload.php' => false,
-) as $dependencyAutoloader => $required) {
- if ($required || file_exists($dependencyAutoloader)) {
- require_once $dependencyAutoloader;
- }
-}
-
-return $fedoraClassLoader;
+require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('Aws\\', __DIR__);
+
+\Fedora\Autoloader\Dependencies::required(array(
+ '%{phpdir}/Guzzle/autoload.php',
+));
+
+\Fedora\Autoloader\Dependencies::optional(array(
+ '%{phpdir}/Doctrine/Common/Cache/autoload.php',
+ '%{phpdir}/Monolog/autoload.php',
+ '%{phpdir}/Symfony/Component/Yaml/autoload.php',
+));
+
AUTOLOAD
@@ -157,8 +143,6 @@ AUTOLOAD
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{phpdir}/AWSSDKforPHP
cp -pr src/* %{buildroot}%{phpdir}/
: Compat directory structure with old PEAR pkg
@@ -186,12 +170,7 @@ if [ -x %{_bindir}/pear ]; then
fi
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc composer.json
@@ -200,6 +179,9 @@ rm -rf %{buildroot}
%changelog
+* Wed May 10 2017 Valentin Collet <valentin@famillecollet.com> - 2.8.31-3
+- Switch to fedora/autoloader
+
* Sun Jul 24 2016 Remi Collet <remi@remirepo.net> - 2.8.31-1
- Update to 2.8.31