summaryrefslogtreecommitdiffstats
path: root/php-aws-php-sns-message-validator.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-aws-php-sns-message-validator.spec')
-rw-r--r--php-aws-php-sns-message-validator.spec48
1 files changed, 15 insertions, 33 deletions
diff --git a/php-aws-php-sns-message-validator.spec b/php-aws-php-sns-message-validator.spec
index 6ea9012..f9b0483 100644
--- a/php-aws-php-sns-message-validator.spec
+++ b/php-aws-php-sns-message-validator.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-aws-php-sns-message-validator
#
-# Copyright (c) 2016 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2017 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -28,7 +28,7 @@
Name: php-%{composer_project}
Version: %{github_version}
-Release: 1%{?github_release}%{?dist}
+Release: 3%{?github_release}%{?dist}
Summary: Amazon SNS message validation
Group: Development/Libraries
@@ -36,7 +36,6 @@ License: ASL 2.0
URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -50,7 +49,7 @@ BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-spl
## Autoloader
-BuildRequires: php-composer(symfony/class-loader)
+BuildRequires: php-composer(fedora/autoloader)
%endif
# composer.json
@@ -61,7 +60,7 @@ Requires: php-json
Requires: php-pcre
Requires: php-spl
# Autoloader
-Requires: php-composer(symfony/class-loader)
+Requires: php-composer(fedora/autoloader)
# Standard "php-{COMPOSER_VENDOR}-{COMPOSER_PROJECT}" naming
Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release}
@@ -86,21 +85,12 @@ cat <<'AUTOLOAD' | tee src/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';
- }
+require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
+\Fedora\Autoloader\Autoload::addPsr4('Aws\\Sns\\', __DIR__);
-$fedoraClassLoader->addPrefix('Aws\\Sns\\', dirname(dirname(__DIR__)));
-
-return $fedoraClassLoader;
AUTOLOAD
@@ -109,41 +99,30 @@ AUTOLOAD
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{phpdir}/Aws/Sns
cp -rp src/* %{buildroot}%{phpdir}/Aws/Sns/
%check
%if %{with_tests}
-: Make PSR-0 tests
-mkdir -p tests-psr0/Aws
-ln -s ../../tests tests-psr0/Aws/Sns
-
: Create tests bootstrap
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Aws/Sns/autoload.php';
-$fedoraClassLoader->addPrefix('Aws\\Sns\\', __DIR__.'/tests-psr0');
+\Fedora\Autoloader\Autoload::addPsr4('Aws\\Sns\\', __DIR__.'/tests');
BOOTSTRAP
-%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
-
-if which php70; then
- php70 %{_bindir}/phpunit --verbose --bootstrap bootstrap.php
-fi
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --verbose --bootstrap bootstrap.php
+ fi
+done
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc composer.json
@@ -153,6 +132,9 @@ rm -rf %{buildroot}
%changelog
+* Wed May 10 2017 Valentin Collet <valentin@famillecollet.com> - 1.1.0-3
+- Switch to fedora/autoloader
+
* Sat Apr 16 2016 Remi Collet <remi@remirepo.net> - 1.1.0-1
- backport for remi repository