diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-07-24 06:58:28 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-07-24 06:58:28 +0200 |
commit | be0aeccf5332856624ca4fe75d307a7a53cd132b (patch) | |
tree | d0c5a78316f5359fed0d79bddbc1437311444431 | |
parent | cece44896f27f01c5ba20e46b517dc88e49a6c45 (diff) |
php-akamai-open-edgegrid-client: 0.4.5 (backported from Fedora)
-rw-r--r-- | composer.json | 42 | ||||
-rw-r--r-- | php-akamai-open-edgegrid-client.spec | 49 |
2 files changed, 80 insertions, 11 deletions
diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..2baf380 --- /dev/null +++ b/composer.json @@ -0,0 +1,42 @@ +{ + "name": "akamai-open/edgegrid-client", + "description": "Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client_Auth.html", + "keywords": ["akamai", "open", "edgegrid"], + "type": "library", + "license": "Apache-2.0", + "homepage": "https://github.com/akamai-open/edgegrid-auth-php", + "authors": [ + { + "name": "Davey Shafik", + "email": "dshafik@akamai.com" + } + ], + "require": { + "php": ">=5.5", + "guzzlehttp/guzzle": "~6.0", + "psr/log": "^1.0", + "monolog/monolog": "^1.15", + "League/CLImate": "~3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.7", + "theseer/phpdox": "~0.8", + "phploc/phploc": "^2.1", + "squizlabs/php_codesniffer": "^2.3", + "fabpot/php-cs-fixer": "^1.9", + "kherge/box": "^2.5" + }, + "autoload": { + "psr-4": { + "Akamai\\Open\\EdgeGrid\\": "src/", + "Monolog\\": "src/Monolog" + } + }, + "autoload-dev": { + "psr-4": { + "Akamai\\Open\\EdgeGrid\\Tests\\": "tests", + "GuzzleHttp\\Tests\\": "vendor/guzzlehttp/guzzle/tests", + "Monolog\\": "tests/Monolog" + } + } +} diff --git a/php-akamai-open-edgegrid-client.spec b/php-akamai-open-edgegrid-client.spec index 5f2f450..4600c40 100644 --- a/php-akamai-open-edgegrid-client.spec +++ b/php-akamai-open-edgegrid-client.spec @@ -12,8 +12,8 @@ %global github_owner akamai-open %global github_name AkamaiOPEN-edgegrid-php -%global github_version 0.4.4 -%global github_commit 4eb9f733cfcd0e1574896b456f62296355bb816f +%global github_version 0.4.5 +%global github_commit 1e079aa0977c7d907427876fdcc38b0042bd2493 %global composer_vendor akamai-open %global composer_project edgegrid-client @@ -48,16 +48,19 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch +# Library version value and autoloader check +BuildRequires: php-cli +## composer.json +BuildRequires: php-composer(guzzlehttp/guzzle) >= %{guzzle_min_ver} +#BuildRequires: php-composer(psr/log) >= %%{psr_log_min_ver} +BuildRequires: php-PsrLog >= %{psr_log_min_ver} # Tests %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(guzzlehttp/guzzle) >= %{guzzle_min_ver} BuildRequires: php-composer(monolog/monolog) >= %{monolog_min_ver} BuildRequires: php-composer(phpunit/phpunit) -#BuildRequires: php-composer(psr/log) >= %%{psr_log_min_ver} -BuildRequires: php-PsrLog >= %{psr_log_min_ver} -## phpcompatinfo (computed from version 0.4.4) +## phpcompatinfo (computed from version 0.4.5) BuildRequires: php-date BuildRequires: php-hash BuildRequires: php-json @@ -76,7 +79,7 @@ Requires: php-composer(monolog/monolog) < %{monolog_max_ver} #Requires: php-composer(psr/log) >= %%{psr_log_min_ver} Requires: php-PsrLog >= %{psr_log_min_ver} Requires: php-composer(psr/log) < %{psr_log_max_ver} -# phpcompatinfo (computed from version 0.4.4) +# phpcompatinfo (computed from version 0.4.5) Requires: php-date Requires: php-hash Requires: php-json @@ -146,6 +149,14 @@ cp -rp src/* %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/ %check +: Library version value and autoloader check +%{_bindir}/php -r ' + require_once "%{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload.php"; + $version = \Akamai\Open\EdgeGrid\Client::VERSION; + echo "Version $version (expected %{version})\n"; + exit(version_compare("%{version}", "$version", "=") ? 0 : 1); +' + %if %{with_tests} : Make PSR-0 tests mkdir -p tests-psr0/Akamai/Open/EdgeGrid @@ -156,14 +167,26 @@ cat <<'BOOTSTRAP' | tee bootstrap.php <?php require_once '%{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload.php'; -$fedoraClassLoader->addPrefix('Akamai\\Open\\EdgeGrid\\Tests\\', __DIR__.'/tests-psr0'); +$fedoraClassLoader->addPrefix( + 'Akamai\\Open\\EdgeGrid\\Tests\\', + __DIR__.'/tests-psr0' +); BOOTSTRAP +run=0 +ret=0 +if which php56; then + php56 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1 + run=1 +fi +if which php71; then + php71 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then %{_bindir}/phpunit --verbose --bootstrap bootstrap.php - -if which php70; then - php70 %{_bindir}/phpunit --verbose --bootstrap bootstrap.php fi +exit $ret %else : Tests skipped %endif @@ -185,6 +208,10 @@ rm -rf %{buildroot} %changelog +* Sat Jul 23 2016 Shawn Iwinski <shawn@iwin.ski> - 0.4.5-1 +- Updated to 0.4.5 (RHBZ #1333785) +- Added library version value and autoloader check + * Fri Apr 15 2016 Remi Collet <remi@remirepo.net> - 0.4.4-1 - backport for remi repository |