summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json5
-rw-r--r--php-paragonie-constant-time-encoding.spec65
2 files changed, 38 insertions, 32 deletions
diff --git a/composer.json b/composer.json
index 3f616e1..1d80ae0 100644
--- a/composer.json
+++ b/composer.json
@@ -26,11 +26,10 @@
"source": "https://github.com/paragonie/constant_time_encoding"
},
"require": {
- "php": "^5.3|^7"
+ "php": "^7"
},
"require-dev": {
- "phpunit/phpunit": "4.*|5.*",
- "paragonie/random_compat": "^1|^2",
+ "phpunit/phpunit": "^6|^7",
"vimeo/psalm": "^1"
},
"autoload": {
diff --git a/php-paragonie-constant-time-encoding.spec b/php-paragonie-constant-time-encoding.spec
index ecef537..453e10e 100644
--- a/php-paragonie-constant-time-encoding.spec
+++ b/php-paragonie-constant-time-encoding.spec
@@ -14,14 +14,14 @@
%global github_owner paragonie
%global github_name constant_time_encoding
-%global commit0 6111a38faf6fdebc14e36652d22036f379ba58d3
+%global commit0 eccf915f45f911bfb189d1d1638d940ec6ee6e33
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Name: php-%{composer_vendor}-constant-time-encoding
-Version: 1.0.2
+Version: 2.2.2
Release: 1%{?dist}
-Summary: Constant-Time Character Encoding in PHP Projects
+Summary: Constant-time Implementations of RFC 4648 Encoding
Group: System Environment/Libraries
License: MIT
@@ -31,54 +31,51 @@ Source0: %{url}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
BuildArch: noarch
-BuildRequires: php(language) >= 5.3.0
+BuildRequires: php(language) >= 7.0
BuildRequires: php-mbstring
BuildRequires: php-spl
-BuildRequires: php-pcre
-BuildRequires: php-composer(fedora/autoloader)
-BuildRequires: php-composer(paragonie/random_compat)
-BuildRequires: %{_bindir}/phpunit
-
-Requires: php(language) >= 5.3.0
+BuildRequires: %{_bindir}/phpab
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7
+%else
+%global phpunit %{_bindir}/phpunit6
+BuildRequires: phpunit6
+%endif
+
+Requires: php(language) >= 7.0
Requires: php-mbstring
Requires: php-spl
-Requires: php-composer(fedora/autoloader)
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
%description
Based on the constant-time base64 implementation made by Steve "Sc00bz"
-Thomas, this library aims to offer character encoding functions that do not
-leak information about what you are encoding/decoding via processor cache
-misses.
+Thomas, this library aims to offer character encoding functions that do
+not leak information about what you are encoding/decoding via processor
+cache misses.
%prep
%setup -n %{github_name}-%{commit0}
%build
-cat <<'AUTOLOAD' | tee src/autoload.php
-<?php
-require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
-
-\Fedora\Autoloader\Autoload::addPsr4('ParagonIE\\ConstantTime\\', __DIR__);
-AUTOLOAD
+%{_bindir}/phpab -o src/autoload.php src
%install
mkdir -p %{buildroot}%{_datadir}/php/%{composer_namespace}
cp -pr src/* %{buildroot}%{_datadir}/php/%{composer_namespace}
%check
-mkdir vendor
-cat << 'EOF' | tee vendor/autoload.php
-<?php
-require_once '%{buildroot}%{_datadir}/php/%{composer_namespace}/autoload.php';
-require_once '%{_datadir}/php/random_compat/autoload.php';
-EOF
+%{_bindir}/phpab -o tests/autoload.php tests
+cat <<'AUTOLOAD' | tee -a tests/autoload.php
+require_once 'src/autoload.php';
+AUTOLOAD
ret=0
-for cmd in php php70 php71; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit --no-coverage --verbose || ret=1
+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
fi
done
exit $ret
@@ -92,6 +89,16 @@ exit $ret
%license LICENSE.txt
%changelog
+* 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
+- use phpunit6/phpunit7
+
+* Tue May 01 2018 François Kooman <fkooman@tuxed.net> - 2.2.2-1
+- update to 2.2.2 for PHP >= 7
+- update dependencies
+- switch to phpab autoload generator
+
* Sat Mar 10 2018 François Kooman <fkooman@tuxed.net> - 1.0.2-1
- update to 1.0.2