summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-25 07:17:52 +0200
committerRemi Collet <remi@remirepo.net>2017-09-25 07:17:52 +0200
commit9a760a96f97292e8b12e70c07edf5636fdc95d1e (patch)
treec98f1f53cdea2bcdd866191a177c4ac386117e1f
parent2674295f776b7a8a384dbcd88157540f4d6b320f (diff)
sync with Fedora
-rw-r--r--php-simplesamlphp-saml2.spec53
1 files changed, 27 insertions, 26 deletions
diff --git a/php-simplesamlphp-saml2.spec b/php-simplesamlphp-saml2.spec
index 9aee4f2..cee1b8f 100644
--- a/php-simplesamlphp-saml2.spec
+++ b/php-simplesamlphp-saml2.spec
@@ -38,7 +38,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 4%{?github_release}%{?dist}
+Release: 5%{?github_release}%{?dist}
Summary: SAML2 PHP library from SimpleSAMLphp
Group: Development/Libraries
@@ -46,7 +46,6 @@ License: LGPLv2
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}
@@ -55,11 +54,14 @@ BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(psr/log) < %{psr_log_max_ver}
BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver}
-BuildRequires: php-composer(robrichards/xmlseclibs) < %{robrichards_xmlseclibs_max_ver}
+BuildRequires: php-composer(robrichards/xmlseclibs) < %{robrichards_xmlseclibs_max_ver}
BuildRequires: php-composer(robrichards/xmlseclibs) >= %{robrichards_xmlseclibs_min_ver}
BuildRequires: php-dom
BuildRequires: php-openssl
+%if 0
BuildRequires: php-composer(mockery/mockery) >= %{mockery_min_ver}
+BuildRequires: php-composer(mockery/mockery) < %{mockery_max_ver}
+%endif
## phpcompatinfo (computed from version 2.3.4)
BuildRequires: php-date
BuildRequires: php-libxml
@@ -132,8 +134,6 @@ AUTOLOAD
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{phpdir}
cp -rp src/* %{buildroot}%{phpdir}/
@@ -146,35 +146,32 @@ cat <<'AUTOLOAD' | tee vendor/autoload.php
<?php
require '%{buildroot}%{phpdir}/SAML2/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('SAML2\\', dirname(__DIR__).'/tests/SAML2');
+%if 1
require_once '%{phpdir}/Mockery/autoload.php';
+%endif
AUTOLOAD
-: Run tests
-ret=0
-run=0
-if which php56; then
- php56 %{_bindir}/phpunit --configuration=tools/phpunit || ret=1
- run=1
-fi
-if which php71; then
- php71 %{_bindir}/phpunit --configuration=tools/phpunit || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/phpunit --configuration=tools/phpunit --verbose
-fi
-exit $ret
+%if 0
+: Remove tests requiring Mockery
+grep -r --files-with-matches Mockery tests | xargs rm -f
+%endif
+
+: Upstream tests
+RETURN_CODE=0
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose --configuration=tools/phpunit \
+ || RETURN_CODE=1
+ fi
+done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -183,7 +180,11 @@ rm -rf %{buildroot}
%changelog
-* Fri Sep 8 2017 Remi Collet <remi@remirepo.net> - 2.3.4-3
+* Sat Sep 23 2017 Shawn Iwinski <shawn@iwin.ski> - 2.3.4-5
+- Test with SCLs if available
+- Add max version constraint to mockery/mockery BuildRequires
+
+* Fri Sep 8 2017 Remi Collet <remi@remirepo.net> - 2.3.4-4
- add maximal version to build dependency, Fix FTBFS from Koshei
* Thu Dec 15 2016 Shawn Iwinski <shawn@iwin.ski> - 2.3.4-1