diff options
author | Remi Collet <remi@remirepo.net> | 2017-05-10 16:02:00 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-05-10 16:02:00 +0200 |
commit | fe377747dda08866d36db07937fbee7cb9560794 (patch) | |
tree | 8d0c14886950bb975f32092224969d667f3b54c7 | |
parent | 7a40330cace135e9c642f50ab275e02f31118df0 (diff) |
sync with Fedora
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | php-aws-php-sns-message-validator.spec | 48 |
2 files changed, 22 insertions, 33 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-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 |