# remirepo/fedora spec file for php-pragmarx-google2fa8 # # Copyright (c) 2018-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %bcond_without tests # Github %global gh_commit 26c4c5cf30a2844ba121760fd7301f8ad240100b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner antonioribeiro %global gh_project google2fa # Packagist %global pk_vendor pragmarx %global pk_project %{gh_project} # Namespace %global ns_vendor PragmaRX %global ns_project Google2FA %global major 8 Name: php-%{pk_vendor}-%{pk_project}%{major} Version: 8.0.0 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: Google Two-Factor Authentication for PHP, version %{major} License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} # git snapshot to retrieve test suite Source0: %{name}-%{version}-%{?gh_short}.tgz Source1: makesrc.sh BuildArch: noarch %if %{with tests} BuildRequires: php(language) >= 7.1 # 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) # remirepo:3 %else BuildRequires: php-paragonie-constant-time-encoding %endif BuildRequires: php-date BuildRequires: php-hash BuildRequires: php-pcre # For tests, from composer.json "require-dev": { # "phpunit/phpunit": "^7.5.15|^8.5|^9.0", # "phpstan/phpstan": "^0.12.18" BuildRequires: phpunit9 %global phpunit %{_bindir}/phpunit9 # For autoloader BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { # "php": "^7.1|^8.0", # "paragonie/constant_time_encoding": "~1.0|~2.0", Requires: php(language) >= 7.1 # 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) # remirepo:3 %else Requires: php-paragonie-constant-time-encoding %endif # From phpcompatinfo report for 5.0.0 Requires: php-hash Requires: php-pcre # For generated autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} %description Google2FA is a PHP implementation of the Google Two-Factor Authentication 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}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} : Create autoloader cat <<'AUTOLOAD' | tee src/autoload.php - 8.0.0-1 - update to 8.0.0 - rename to php-pragmarx-google2fa8 - raise dependency on PHP 7.1 - drop dependency on paragonie/random_compat * Wed Mar 24 2021 Remi Collet - 5.0.0-5 - switch to phpunit7 * Tue Sep 10 2019 Remi Collet - 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) * Mon Aug 20 2018 Remi Collet - 3.0.2-1 - update to 3.0.2 (no change) * Wed May 2 2018 Remi Collet - 3.0.1-2 - allow paragonie/constant_time_encoding v2 * Thu Mar 22 2018 Remi Collet - 3.0.1-1 - update to 3.0.1 - license have be changed to MIT * Wed Mar 7 2018 Remi Collet - 2.0.7-2 - add GPLv3+ to License field and ask upstream for clarification https://github.com/antonioribeiro/google2fa/issues/95 * Wed Mar 7 2018 Remi Collet - 2.0.7-1 - initial package