summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json41
-rw-r--r--php-akamai-open-edgegrid-auth.spec26
2 files changed, 67 insertions, 0 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..4eb368f
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "akamai-open/edgegrid-auth",
+ "description": "Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client_Auth.html",
+ "keywords": ["akamai", "open", "edgegrid", "authentication"],
+ "type": "library",
+ "license": "Apache-2.0",
+ "homepage": "https://github.com/akamai-open/AkamaiOPEN-edgegrid-php",
+ "authors": [
+ {
+ "name": "Davey Shafik",
+ "email": "dshafik@akamai.com"
+ }
+ ],
+ "require": {
+ "php": ">=5.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.7",
+ "squizlabs/php_codesniffer": "^2.3",
+ "friendsofphp/php-cs-fixer": "^1.9",
+ "kherge/box": "^2.5"
+ },
+ "suggest": {
+ "akamai-open/edgegrid-client": "Provide a fully featured HTTP client & CLI pre-configured with EdgeGrid authentication. (PHP 5.5+)"
+ },
+ "autoload": {
+ "psr-4": {
+ "Akamai\\Open\\EdgeGrid\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Akamai\\Open\\EdgeGrid\\Tests\\": "tests"
+ }
+ },
+ "config": {
+ "platform": {
+ "php": "5.3.6"
+ }
+ }
+}
diff --git a/php-akamai-open-edgegrid-auth.spec b/php-akamai-open-edgegrid-auth.spec
index de632ed..d4cc742 100644
--- a/php-akamai-open-edgegrid-auth.spec
+++ b/php-akamai-open-edgegrid-auth.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-akamai-open-edgegrid-auth, from:
#
# Fedora spec file for php-akamai-open-edgegrid-auth
#
@@ -35,6 +36,7 @@ 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
# Autoloader
BuildRequires: %{_bindir}/phpab
@@ -89,6 +91,8 @@ Autoloader: %{phpdir}/Akamai/Open/EdgeGrid/autoload-auth.php
%install
+rm -rf %{buildroot}
+
mkdir -p %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid
cp -rp src/* %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/
@@ -98,14 +102,33 @@ cp -rp src/* %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/
: Remove logging from PHPUnit config
sed '/log/d' phpunit.xml.dist > phpunit.xml
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload-auth.php || ret=1
+ run=1
+fi
+if which php70; then
+ # PHP 7.1 => 1 failure: Akamai\Open\EdgeGrid\Tests\Client\Authentication\TimestampTest::testTimestampFormat
+ php70 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload-auth.php || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
%{_bindir}/phpunit --verbose \
--bootstrap %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload-auth.php
+fi
+exit $ret
%else
: Tests skipped
%endif
+%clean
+rm -rf %{buildroot}
+
+
%files
+%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -119,5 +142,8 @@ sed '/log/d' phpunit.xml.dist > phpunit.xml
%changelog
+* Fri Oct 21 2016 Remi Collet <remim@remirepo.net> - 0.6.0-1
+- add backport stuff
+
* Mon Oct 10 2016 Shawn Iwinski <shawn@iwin.ski> - 0.6.0-1
- Initial package