summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--composer.json63
-rwxr-xr-xphp-aws-sdk3-get-source.sh4
-rw-r--r--php-aws-sdk3.spec19
4 files changed, 89 insertions, 1 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..8519343
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,63 @@
+{
+ "name": "aws/aws-sdk-php",
+ "homepage": "http://aws.amazon.com/sdkforphp",
+ "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
+ "keywords": ["aws","amazon","sdk","s3","ec2","dynamodb","cloud","glacier"],
+ "type": "library",
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "Amazon Web Services",
+ "homepage": "http://aws.amazon.com"
+ }
+ ],
+ "support": {
+ "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
+ "issues": "https://github.com/aws/aws-sdk-php/issues"
+ },
+ "require": {
+ "php": ">=5.5",
+ "guzzlehttp/guzzle": "~5.3|~6.0.1|~6.1",
+ "guzzlehttp/psr7": "~1.0",
+ "guzzlehttp/promises": "~1.0",
+ "mtdowling/jmespath.php": "~2.2"
+ },
+ "require-dev": {
+ "ext-openssl": "*",
+ "ext-pcre": "*",
+ "ext-spl": "*",
+ "ext-json": "*",
+ "ext-dom": "*",
+ "ext-simplexml": "*",
+ "phpunit/phpunit": "~4.0|~5.0",
+ "behat/behat": "~3.0",
+ "doctrine/cache": "~1.4",
+ "aws/aws-php-sns-message-validator": "~1.0",
+ "nette/neon": "^2.3",
+ "andrewsville/php-token-reflection": "^1.4",
+ "psr/cache": "^1.0"
+ },
+ "suggest": {
+ "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages",
+ "ext-curl": "To send requests using cURL",
+ "doctrine/cache": "To use the DoctrineCacheAdapter",
+ "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications"
+ },
+ "autoload": {
+ "psr-4": {
+ "Aws\\": "src/"
+ },
+ "files": ["src/functions.php"]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Aws\\Test\\": "tests/"
+ },
+ "classmap": ["build/"]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ }
+}
diff --git a/php-aws-sdk3-get-source.sh b/php-aws-sdk3-get-source.sh
index ba71f5d..4ad1051 100755
--- a/php-aws-sdk3-get-source.sh
+++ b/php-aws-sdk3-get-source.sh
@@ -43,6 +43,8 @@ print "GIT_REPO = $GIT_REPO"
print "GIT_DIR = $GIT_DIR"
TEMP_DIR=$(mktemp --dir)
+TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+CMP_FILE=$PWD/composer.json
pushd $TEMP_DIR
print "Cloning git repo..."
@@ -51,6 +53,7 @@ pushd $TEMP_DIR
pushd $GIT_DIR
print "Checking out commit..."
$GIT checkout $GIT_COMMIT
+ cp composer.json $CMP_FILE
popd
TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
@@ -58,7 +61,6 @@ pushd $TEMP_DIR
mv $GIT_DIR $TAR_DIR
- TAR_FILE=`$RPM --eval='%{_sourcedir}'`/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
print "TAR_FILE = $TAR_FILE"
[ -e $TAR_FILE ] && rm -f $TAR_FILE
diff --git a/php-aws-sdk3.spec b/php-aws-sdk3.spec
index a17f4b6..a554815 100644
--- a/php-aws-sdk3.spec
+++ b/php-aws-sdk3.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-aws-sdk3, from
#
# Fedora spec file for php-aws-sdk3
#
@@ -67,6 +68,7 @@ URL: http://aws.amazon.com/sdkforphp
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
Source1: %{name}-get-source.sh
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Library version value and autoloader check
BuildRequires: php-cli >= %{php_min_ver}
@@ -130,6 +132,7 @@ Requires: php-composer(symfony/class-loader)
# Weak dependencies
## composer.json: optional
+%if 0%{?fedora} >= 21
Suggests: php-curl
Suggests: php-openssl
Suggests: php-composer(doctrine/cache)
@@ -138,6 +141,7 @@ Conflicts: php-doctrine-cache >= %{doctrine_cache_max_ver}
Suggests: php-composer(aws/aws-php-sns-message-validator)
Conflicts: php-aws-php-sns-message-validator < %{aws_sns_message_validator_min_ver}
Conflicts: php-aws-php-sns-message-validator >= %{aws_sns_message_validator_max_ver}
+%endif
# Composer
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
@@ -202,6 +206,8 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
+
mkdir -p %{buildroot}%{phpdir}/Aws3
cp -pr src/* %{buildroot}%{phpdir}/Aws3/
@@ -246,13 +252,23 @@ rm -f \
export AWS_ACCESS_KEY_ID=foo
export AWS_SECRET_ACCESS_KEY=bar
+
%{_bindir}/phpunit -d memory_limit=1G --verbose --bootstrap bootstrap.php
+
+if which php70; then
+ php70 %{_bindir}/phpunit -d memory_limit=1G --verbose --bootstrap bootstrap.php
+fi
%else
: Tests skipped
%endif
+%clean
+rm -rf %{buildroot}
+
+
%files
+%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc CHANGELOG.md
@@ -263,6 +279,9 @@ export AWS_SECRET_ACCESS_KEY=bar
%changelog
+* Thu Apr 21 2016 Remi Collet <remi@remirepo.net> - 3.18.0-1
+- backport for remi repository
+
* Wed Apr 20 2016 Shawn Iwinski <shawn@iwin.ski> - 3.18.0-1
- Updated to 3.18.0
- Modified autoloader to not use @include_once for optional dependencies