summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Iwinski <shawn@iwin.ski>2017-07-12 22:02:13 -0400
committerRemi Collet <remi@remirepo.net>2017-07-13 06:30:59 +0200
commitc80b099e603330d54a41c03d8aad9e6555df7770 (patch)
tree3fdc06d1d18a0abe382eeaec5f1fe98f64634a35
parenta66fd9bc3887f0cebfd73d48cf3459b07e5820fa (diff)
Update to 1.2.0 (RHBZ #1470413)
- Test with SCLs if available
-rw-r--r--php-aws-php-sns-message-validator.spec52
1 files changed, 42 insertions, 10 deletions
diff --git a/php-aws-php-sns-message-validator.spec b/php-aws-php-sns-message-validator.spec
index 5247c34..5025709 100644
--- a/php-aws-php-sns-message-validator.spec
+++ b/php-aws-php-sns-message-validator.spec
@@ -12,14 +12,20 @@
%global github_owner aws
%global github_name aws-php-sns-message-validator
-%global github_version 1.1.0
-%global github_commit c9fce7635417bcc75383ec5f6fa3790a4d9729b8
+%global github_version 1.2.0
+%global github_commit 5135ef78833a6661a73c82d41398da746a8fb3b1
%global composer_vendor aws
%global composer_project aws-php-sns-message-validator
# "php": ">=5.4"
%global php_min_ver 5.4
+# "guzzlehttp/psr7": "^1.4"
+%global guzzlehttp_psr7_min_ver 1.4
+%global guzzlehttp_psr7_max_ver 2.0
+# "psr/http-message": "^1.0"
+%global psr_http_message_min_ver 1.0
+%global psr_http_message_max_ver 2.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -28,7 +34,7 @@
Name: php-%{composer_project}
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: Amazon SNS message validation
Group: Development/Libraries
@@ -41,7 +47,11 @@ BuildArch: noarch
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
+BuildRequires: php-composer(guzzlehttp/psr7) < %{guzzlehttp_psr7_max_ver}
+BuildRequires: php-composer(guzzlehttp/psr7) >= %{guzzlehttp_psr7_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
+BuildRequires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
BuildRequires: php-openssl
## phpcompatinfo (computed from version 1.1.0)
BuildRequires: php-date
@@ -54,6 +64,8 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
+Requires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
+Requires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
Requires: php-openssl
# phpcompatinfo (computed from version 1.1.0)
Requires: php-json
@@ -78,26 +90,28 @@ Autoloader: %{phpdir}/Aws/Sns/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
+: Fix spurious-executable-perm
+chmod a-x composer.json
+
+
+%build
: Create autoloader
cat <<'AUTOLOAD' | tee src/autoload.php
<?php
/**
* Autoloader for %{name} and its' dependencies
* (created by %{name}-%{version}-%{release}).
- *
*/
-
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Aws\\Sns\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/Psr/Http/Message/autoload.php',
+]);
AUTOLOAD
-%build
-# Empty build section, nothing to build
-
-
%install
mkdir -p %{buildroot}%{phpdir}/Aws/Sns
cp -rp src/* %{buildroot}%{phpdir}/Aws/Sns/
@@ -109,10 +123,24 @@ cp -rp src/* %{buildroot}%{phpdir}/Aws/Sns/
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Aws/Sns/autoload.php';
+
\Fedora\Autoloader\Autoload::addPsr4('Aws\\Sns\\', __DIR__.'/tests');
+
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/GuzzleHttp/Psr7/autoload.php',
+]);
BOOTSTRAP
-%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
+: Upstream tests
+RETURN_CODE=0
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
+ || RETURN_CODE=1
+ fi
+done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
@@ -128,6 +156,10 @@ BOOTSTRAP
%changelog
+* Wed Jul 12 2017 Shawn Iwinski <shawn@iwin.ski> - 1.2.0-1
+- Update to 1.2.0 (RHBZ #1470413)
+- Test with SCLs if available
+
* Wed May 10 2017 Valentin Collet <valentin@famillecollet.com> - 1.1.0-3
- Switch to fedora/autoloader