diff options
Diffstat (limited to 'php-egulias-email-validator3.spec')
-rw-r--r-- | php-egulias-email-validator3.spec | 69 |
1 files changed, 41 insertions, 28 deletions
diff --git a/php-egulias-email-validator3.spec b/php-egulias-email-validator3.spec index 850617c..e5cffa6 100644 --- a/php-egulias-email-validator3.spec +++ b/php-egulias-email-validator3.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-egulias-email-validator2 +# remirepo/fedora spec file for php-egulias-email-validator3 # # Copyright (c) 2014-2021 Shawn Iwinski, Remi Collet # @@ -10,19 +10,19 @@ %global github_owner egulias %global github_name EmailValidator -%global github_version 2.1.25 -%global github_commit 0dbf5d78455d4d6a41d186da50adc1122ec066f4 +%global github_version 3.1.0 +%global github_commit 62c3b73c581c834885acf6e120b412b76acc495a %global github_short %(c=%{github_commit}; echo ${c:0:7}) -%global major 2 +%global major 3 %global composer_vendor egulias %global composer_project email-validator -# "php": ">= 5.5" -%global php_min_ver 5.5 -# "doctrine/lexer": "^1.0.1" -%global doctrine_lexer_min_ver 1.0.1 -%global doctrine_lexer_max_ver 2.0 +# "php": ">= 7.2" +%global php_min_ver 7.2 +# "doctrine/lexer": "^1.2" +%global doctrine_lexer_min_ver 1.2 +%global doctrine_lexer_max_ver 2 # Build using "--without tests" to disable tests %bcond_without tests @@ -39,32 +39,36 @@ URL: https://github.com/%{github_owner}/%{github_name} Source0: %{name}-%{github_version}-%{github_short}.tgz Source1: makesrc.sh -# adapt for recent PHPUnit -Patch0: %{name}-phpunit.patch - BuildArch: noarch # Tests %if %{with tests} ## composer.json (require-dev) -# "dominicsayers/isemail": "^3.0.7", -# "phpunit/phpunit": "^4.8.36|^7.5.15", -# "satooshi/php-coveralls": "^1.0.1" -%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 -BuildRequires: (php-composer(doctrine/lexer) >= %{doctrine_lexer_min_ver} with php-composer(doctrine/lexer) < %{doctrine_lexer_max_ver}) -%global phpunit %{_bindir}/phpunit9 +# "php-coveralls/php-coveralls": "^2.2", +# "phpunit/phpunit": "^8.5.8|^9.3.3", +# "vimeo/psalm": "^4" +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +%global phpunit %{_bin dir}/phpunit9 +BuildRequires: phpunit9 >= 9.3.3 %else -BuildRequires: php-doctrine-lexer >= %{doctrine_lexer_min_ver} %global phpunit %{_bindir}/phpunit8 +BuildRequires: phpunit8 >= 8.5.8 %endif -BuildRequires: %{phpunit} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -## phpcompatinfo (computed from version 2.1.2) -BuildRequires: php-dom -BuildRequires: php-filter +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(doctrine/lexer) >= %{doctrine_lexer_min_ver} with php-composer(doctrine/lexer) < %{doctrine_lexer_max_ver}) +# remirepo:4 +%else +BuildRequires: php-doctrine-lexer < %{doctrine_lexer_max_ver} +BuildRequires: php-doctrine-lexer >= %{doctrine_lexer_min_ver} +%endif +## phpcompatinfo (computed from version 3.1.0) BuildRequires: php-intl +BuildRequires: php-mbstring BuildRequires: php-pcre BuildRequires: php-spl +BuildRequires: php-xml ## Autoloader BuildRequires: php-fedora-autoloader-devel %endif @@ -74,14 +78,17 @@ Requires: php(language) >= %{php_min_ver} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(doctrine/lexer) >= %{doctrine_lexer_min_ver} with php-composer(doctrine/lexer) < %{doctrine_lexer_max_ver}) -# remirepo:3 +# remirepo:4 %else +Requires: php-doctrine-lexer < %{doctrine_lexer_max_ver} Requires: php-doctrine-lexer >= %{doctrine_lexer_min_ver} %endif -# phpcompatinfo (computed from version 2.1.2) +# phpcompatinfo (computed from version 3.1.0) Requires: php-intl +Requires: php-mbstring Requires: php-pcre Requires: php-spl +Requires: php-xml # Autoloader Requires: php-composer(fedora/autoloader) @@ -96,7 +103,6 @@ Autoloader: %{phpdir}/Egulias/EmailValidator%{major}/autoload.php %prep %setup -qn %{github_name}-%{github_commit} -%patch0 -p1 -b .phpunit %build @@ -124,12 +130,12 @@ mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php require_once "%{buildroot}%{phpdir}/Egulias/EmailValidator%{major}/autoload.php"; -\Fedora\Autoloader\Autoload::addPsr4('Egulias\\Tests\\', dirname(__DIR__) . "/tests"); +\Fedora\Autoloader\Autoload::addPsr4('Egulias\\EmailValidator\\Tests\\', dirname(__DIR__) . "/tests"); EOF : Skip online tests rm tests/EmailValidator/Validation/DNSCheckValidationTest.php -rm tests/EmailValidator/Validation/SpoofCheckValidationTest.php +rm tests/EmailValidator/Validation/Extra/SpoofCheckValidationTest.php : Upstream tests ret=0 @@ -157,6 +163,13 @@ exit $ret %changelog +* Tue Mar 9 2021 Remi Collet <remi@remirepo.net> - 3.1.0-1 +- update to 3.1.0 +- rename to php-egulias-email-validator3 +- install in /usr/share/php/Egulias/EmailValidator3 +- raise dependency on PHP 7.2 +- raise dependency on doctrine/lexer 1.2 + * Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 2.1.25-1 - update to 2.1.25 |