summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-05-03 14:00:38 +0200
committerRemi Collet <remi@remirepo.net>2018-05-03 14:00:38 +0200
commit58632d35bffa2f3617d948ab60b454c601006194 (patch)
tree37c85db9114e6bd93c5e377f073807b219d9c9f0
parent02528f1a56fcbc29e3062563f4bf9ec4238f7059 (diff)
Sync with Fedora
* Thu May 03 2018 François Kooman <fkooman@tuxed.net> - 2.2.2-3 - simplify detection and use of PHPUnit 6 / PHPUnit 7 * Wed May 02 2018 François Kooman <fkooman@tuxed.net> - 2.2.2-2 - use Fedora template for generating autoloader - match phpunit version with composer.json
-rw-r--r--php-paragonie-constant-time-encoding.spec32
1 files changed, 19 insertions, 13 deletions
diff --git a/php-paragonie-constant-time-encoding.spec b/php-paragonie-constant-time-encoding.spec
index 453e10e..d5ff071 100644
--- a/php-paragonie-constant-time-encoding.spec
+++ b/php-paragonie-constant-time-encoding.spec
@@ -20,7 +20,7 @@
Name: php-%{composer_vendor}-constant-time-encoding
Version: 2.2.2
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Constant-time Implementations of RFC 4648 Encoding
Group: System Environment/Libraries
@@ -31,19 +31,23 @@ Source0: %{url}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
BuildArch: noarch
-BuildRequires: php(language) >= 7.0
+# "php": "^7"
+BuildRequires: php(language) >= 7
BuildRequires: php-mbstring
BuildRequires: php-spl
-BuildRequires: %{_bindir}/phpab
+# "phpunit/phpunit": "^6|^7",
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-%global phpunit %{_bindir}/phpunit7
BuildRequires: phpunit7
+%global phpunit %{_bindir}/phpunit7
%else
-%global phpunit %{_bindir}/phpunit6
BuildRequires: phpunit6
+%global phpunit %{_bindir}/phpunit6
%endif
-Requires: php(language) >= 7.0
+BuildRequires: php-fedora-autoloader-devel
+
+# "php": "^7"
+Requires: php(language) >= 7
Requires: php-mbstring
Requires: php-spl
@@ -59,23 +63,18 @@ cache misses.
%setup -n %{github_name}-%{commit0}
%build
-%{_bindir}/phpab -o src/autoload.php src
+%{_bindir}/phpab -t fedora -o src/autoload.php src
%install
mkdir -p %{buildroot}%{_datadir}/php/%{composer_namespace}
cp -pr src/* %{buildroot}%{_datadir}/php/%{composer_namespace}
%check
-%{_bindir}/phpab -o tests/autoload.php tests
-cat <<'AUTOLOAD' | tee -a tests/autoload.php
-require_once 'src/autoload.php';
-AUTOLOAD
-
ret=0
for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit6" php71 php72; do
if which $cmdarg; then
set $cmdarg
- $1 ${2:-%{_bindir}/phpunit7} --no-coverage --verbose --bootstrap=tests/autoload.php || ret=1
+ $1 ${2:-%{_bindir}/phpunit7} --no-coverage --verbose --bootstrap=src/autoload.php || ret=1
fi
done
exit $ret
@@ -89,6 +88,13 @@ exit $ret
%license LICENSE.txt
%changelog
+* Thu May 03 2018 François Kooman <fkooman@tuxed.net> - 2.2.2-3
+- simplify detection and use of PHPUnit 6 / PHPUnit 7
+
+* Wed May 02 2018 François Kooman <fkooman@tuxed.net> - 2.2.2-2
+- use Fedora template for generating autoloader
+- match phpunit version with composer.json
+
* Wed May 2 2018 Remi Collet <remi@remirepo.net> - 2.2.2-1
- update to 2.2.2 from Fedora
- raise dependency on PHP 7.0