# remirepo spec file for php-paragonie-constant-time-encoding, from: # # Fedora spec file for php-paragonie-constant-time-encoding # # License: MIT # http://opensource.org/licenses/MIT # # Please preserve changelog entries # %global composer_vendor paragonie %global composer_project constant_time_encoding %global composer_namespace ParagonIE/ConstantTime %global github_owner paragonie %global github_name constant_time_encoding %global commit0 9229e15f2e6ba772f0c55dd6986c563b937170a8 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: php-%{composer_vendor}-constant-time-encoding Version: 2.5.0 Release: 1%{?dist} Summary: Constant-time Implementations of RFC 4648 Encoding License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{name}-%{version}-%{shortcommit0}.tgz Source1: makesrc.sh BuildArch: noarch # "php": "^7|^8" BuildRequires: php(language) >= 7 BuildRequires: php-mbstring BuildRequires: php-spl # "phpunit/phpunit": "^6|^7|^8|^9" BuildRequires: phpunit9 %global phpunit %{_bindir}/phpunit9 BuildRequires: php-fedora-autoloader-devel # "php": "^7|^8" Requires: php(language) >= 7 Requires: php-mbstring Requires: php-spl 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. %prep %setup -n %{github_name}-%{commit0} %build %{_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 ret=0 for cmdarg in php74 php80 php81; do if which $cmdarg; then set $cmdarg $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose --bootstrap=src/autoload.php || ret=1 fi done exit $ret %files %dir %{_datadir}/php/ParagonIE %{_datadir}/php/%{composer_namespace} %doc README.md composer.json %{!?_licensedir:%global license %%doc} %license LICENSE.txt %changelog * Mon Jan 17 2022 François Kooman - 2.5.0-1 - update to 2.5.0 - add makesrc.sh to download source as upstream included .gitattributes to not export tests * Thu Dec 10 2020 François Kooman - 2.4.0-2 - support PHPUnit 8/9 for future PHP 8 support (patch by Remi Collet) * Mon Dec 7 2020 François Kooman - 2.4.0-1 - update to 2.4.0 * Wed Nov 06 2019 François Kooman - 2.3.0-1 - update to 2.3.0 * Thu May 03 2018 François Kooman - 2.2.2-4 - also BuildRequire phpunit7 for future EL release * Thu May 03 2018 François Kooman - 2.2.2-3 - simplify detection and use of PHPUnit 6 / PHPUnit 7 * Wed May 02 2018 François Kooman - 2.2.2-2 - use Fedora template for generating autoloader - match phpunit version with composer.json * Wed May 2 2018 Remi Collet - 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 - 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 - 1.0.2-1 - update to 1.0.2 * Thu Mar 16 2017 Remi Collet - 1.0.1-4 - backport for remi repository * Wed Mar 15 2017 François Kooman - 1.0.1-4 - own parent directory - remove Requires paragonie/random_compat, only needed for build - BuildRequire php-pcre - rework check autoloader * Mon Mar 13 2017 François Kooman - 1.0.1-3 - better follow SourceURL package guidelines for GH * Mon Feb 13 2017 François Kooman - 1.0.1-2 - add random_compat as dependency to be able to run tests on PHP < 7 * Mon Feb 13 2017 François Kooman - 1.0.1-1 - initial package