From 3fb797aff4520a0c492e895c8f9264bf8d44b685 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 17 Dec 2020 11:36:57 +0100 Subject: update to 3.0.0 rename to php-phpseclib3 install in /usr/share/php/phpseclib3 raise dependency on PHP 5.6 add dependency on paragonie/constant_time_encoding add dependency on paragonie/random_compat --- php-phpseclib3.spec | 79 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 24 deletions(-) (limited to 'php-phpseclib3.spec') diff --git a/php-phpseclib3.spec b/php-phpseclib3.spec index 715d79d..ea9b953 100644 --- a/php-phpseclib3.spec +++ b/php-phpseclib3.spec @@ -3,12 +3,14 @@ %global github_owner phpseclib %global github_name phpseclib -%global github_commit 136b9ca7eebef78be14abf90d65c5e57b6bc5d36 +%global github_commit fe62c85e0203503231d489af95d0ac053b7d3575 %global github_short %(c=%{github_commit}; echo ${c:0:7}) +%global major 3 + %bcond_without tests -Name: php-%{composer_vendor} -Version: 2.0.30 +Name: php-%{composer_vendor}%{major} +Version: 3.0.0 Release: 1%{?dist} Summary: PHP Secure Communications Library License: MIT @@ -26,15 +28,18 @@ Source2: makesrc.sh BuildArch: noarch %if %{with tests} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires:(php-composer(paragonie/constant_time_encoding) >= 2 with php-composer(paragonie/constant_time_encoding) < 3) +BuildRequires:(php-composer(paragonie/random_compat) >= 2 with php-composer(paragonie/random_compat) < 3) +%else +BuildRequires: php-paragonie-constant-time-encoding +BuildRequires: php-paragonie-random-compat +%endif BuildRequires: php-composer(fedora/autoloader) %if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 %global phpunit %{_bindir}/phpunit9 %else -%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 %global phpunit %{_bindir}/phpunit6 -%else -%global phpunit %{_bindir}/phpunit -%endif %endif BuildRequires: %{phpunit} BuildRequires: %{_bindir}/phpab @@ -43,7 +48,19 @@ BuildRequires: php-bcmath BuildRequires: php-gmp %endif -Requires: php(language) >= 5.3.3 +# from composer.json, "require": { +# "paragonie/constant_time_encoding": "^1|^2", +# "paragonie/random_compat": "^1.4|^2.0", +# "php": ">=5.6.1" +# +Requires: php(language) >= 5.6.1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(paragonie/constant_time_encoding) >= 2 with php-composer(paragonie/constant_time_encoding) < 3) +Requires: (php-composer(paragonie/random_compat) >= 2 with php-composer(paragonie/random_compat) < 3) +%else +Requires: php-paragonie-constant-time-encoding +Requires: php-paragonie-random-compat +%endif Requires: php-bcmath Requires: php-date Requires: php-gmp @@ -61,8 +78,10 @@ Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} %description MIT-licensed pure-PHP implementations of an arbitrary-precision integer -arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, -Rijndael, AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509 +arithmetic library, Ed25519 / Ed449 / Curve25519 / Curve449, ECDSA / ECDH +(with support for 66 curves), RSA (PKCS#1 v2.2 compliant), DSA / DH, +DES / 3DES / RC4 / Rijndael / AES / Blowfish / Twofish / Salsa20 / ChaCha20, +GCM / Poly1305. %prep @@ -75,20 +94,25 @@ cp %{SOURCE1} %{composer_vendor}/autoload.php %install mkdir -p %{buildroot}%{_datadir}/php -cp -pr %{composer_vendor} %{buildroot}%{_datadir}/php +cp -pr %{composer_vendor} %{buildroot}%{_datadir}/php/%{composer_vendor}%{major} %if %{with tests} %check -%{_bindir}/phpab --output tests/bootstrap.php tests -cat << 'EOF' | tee -a tests/bootstrap.php -if (class_exists("PHPUnit_Framework_TestCase") && !class_exists("PHPUnit\\Framework\\TestCase")) { - class_alias("PHPUnit_Framework_TestCase", "PHPUnit\\Framework\\TestCase"); -} -require "%{buildroot}%{_datadir}/php/%{composer_vendor}/autoload.php"; +cat << 'EOF' | tee tests/bootstrap.php + - 3.0.0-1 +- update to 3.0.0 +- rename to php-phpseclib3 +- install in /usr/share/php/phpseclib3 +- raise dependency on PHP 5.6 +- add dependency on paragonie/constant_time_encoding +- add dependency on paragonie/random_compat + * Thu Dec 17 2020 Remi Collet - 2.0.30-1 - update to 2.0.30 - switch to phpunit9 on Fedora -- cgit