From 9a491f7359688b11e0cb64b44dd97e8ba7ad23ab Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 10 Sep 2019 11:48:53 +0200 Subject: - update to 5.0.0 - rename to php-pragmarx-google2fa5 - move to /usr/share/php/PragmaRX/Google2FA5 - drop dependency on bacon/bacon-qr-code --- php-pragmarx-google2fa5.spec | 64 +++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 31 deletions(-) (limited to 'php-pragmarx-google2fa5.spec') diff --git a/php-pragmarx-google2fa5.spec b/php-pragmarx-google2fa5.spec index 0b249d0..73046aa 100644 --- a/php-pragmarx-google2fa5.spec +++ b/php-pragmarx-google2fa5.spec @@ -1,6 +1,6 @@ -# remirepo/fedora spec file for php-pragmarx-google2fa +# remirepo/fedora spec file for php-pragmarx-google2fa5 # -# Copyright (c) 2018 Remi Collet +# Copyright (c) 2018-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -9,7 +9,7 @@ %global with_tests 0%{!?_without_tests:1} # Github -%global gh_commit 6949226739e4424f40031e6f1c96b1fd64047335 +%global gh_commit 17c969c82f427dd916afe4be50bafc6299aef1b4 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner antonioribeiro %global gh_project google2fa @@ -19,9 +19,10 @@ # Namespace %global ns_vendor PragmaRX %global ns_project Google2FA +%global major 5 -Name: php-%{pk_vendor}-%{pk_project} -Version: 3.0.3 +Name: php-%{pk_vendor}-%{pk_project}%{major} +Version: 5.0.0 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: Google Two-Factor Authentication for PHP Package @@ -32,9 +33,11 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.6 +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(paragonie/constant_time_encoding) >= 1.0 with php-composer(paragonie/constant_time_encoding) < 3) BuildRequires: (php-composer(paragonie/random_compat) >= 2.0 with php-composer(paragonie/random_compat) < 3) +# remirepo:4 %else BuildRequires: php-paragonie-constant-time-encoding BuildRequires: php-paragonie-random-compat @@ -43,13 +46,15 @@ BuildRequires: php-date BuildRequires: php-hash BuildRequires: php-pcre # For tests, from composer.json "require-dev": { -# "phpunit/phpunit": "~4|~5|~6", -# "bacon/bacon-qr-code": "~1.0" -BuildRequires: php-composer(phpunit/phpunit) +# "phpunit/phpunit": "~4|~5|~6" +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(bacon/bacon-qr-code) >= 1.0 with php-composer(bacon/bacon-qr-code) < 2) +BuildRequires: phpunit6 +%global phpunit %{_bindir}/phpunit6 +# remirepo:4 %else -BuildRequires: php-bacon-qr-code +BuildRequires: php-composer(phpunit/phpunit) +%global phpunit %{_bindir}/phpunit %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) @@ -62,23 +67,20 @@ BuildRequires: php-composer(fedora/autoloader) # "symfony/polyfill-php56": "~1.2" # Use 5.6 and avoid polyfill Requires: php(language) >= 5.6 +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 # Only use constant_time_encoding v1 available in Fedora for autoloader path Requires: (php-composer(paragonie/constant_time_encoding) >= 1.0 with php-composer(paragonie/constant_time_encoding) < 3) # Only use random_compat v2 available in Fedora for autoloader path Requires: (php-composer(paragonie/random_compat) >= 2.0 with php-composer(paragonie/random_compat) < 3) +# remirepo:4 %else Requires: php-paragonie-constant-time-encoding Requires: php-paragonie-random-compat %endif -# From phpcompatinfo report for 2.0.7 +# From phpcompatinfo report for 5.0.0 Requires: php-hash Requires: php-pcre -# From composer.json, "suggest": { -# "bacon/bacon-qr-code": "Required to generate inline QR Codes." -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 -Recommends: php-composer(bacon/bacon-qr-code) -%endif # For generated autoloader Requires: php-composer(fedora/autoloader) @@ -92,7 +94,7 @@ Module, supporting the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238. -Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php +Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep @@ -109,9 +111,6 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; '%{_datadir}/php/ParagonIE/ConstantTime/autoload.php', '%{_datadir}/php/random_compat/autoload.php', ]); -\Fedora\Autoloader\Dependencies::optional([ - '%{_datadir}/php/BaconQrCode/autoload.php', -]); AUTOLOAD @@ -122,7 +121,7 @@ AUTOLOAD %install : Library mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} -cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} +cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major} %check @@ -130,19 +129,15 @@ cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 5.0.0-1 +- update to 5.0.0 +- rename to php-pragmarx-google2fa5 +- move to /usr/share/php/PragmaRX/Google2FA5 +- drop dependency on bacon/bacon-qr-code + * Wed Aug 29 2018 Remi Collet - 3.0.3-1 - update to 3.0.3 (no change) -- cgit