diff options
Diffstat (limited to 'php-phpmyadmin-shapefile3.spec')
-rw-r--r-- | php-phpmyadmin-shapefile3.spec | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/php-phpmyadmin-shapefile3.spec b/php-phpmyadmin-shapefile3.spec index 71da145..4ee8263 100644 --- a/php-phpmyadmin-shapefile3.spec +++ b/php-phpmyadmin-shapefile3.spec @@ -1,24 +1,25 @@ # remirepo/fedora spec file for php-phpmyadmin-shapefile # -# Copyright (c) 2017 Remi Collet +# Copyright (c) 2017-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit e23b767f2a81f61fee3fc09fc062879985f3e224 +%global gh_commit c232198ef49d3484f26acfe2d12cab103da9371a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpmyadmin %global gh_project shapefile %global with_tests 0%{!?_without_tests:1} %global ns_vendor PhpMyAdmin %global ns_project ShapeFile +%global major 3 -Name: php-%{gh_owner}-%{gh_project} -Version: 2.1 +Name: php-%{gh_owner}-%{gh_project}%{major} +Version: 3.0.1 Release: 1%{?dist} -Summary: ESRI ShapeFile library for PHP +Summary: ESRI ShapeFile library for PHP, version %{major} Group: Development/Libraries License: GPLv2+ @@ -27,18 +28,26 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit BuildArch: noarch %if %{with_tests} -BuildRequires: php(language) >= 5.4 +BuildRequires: php(language) >= 7.1 # For tests, from composer.json "require-dev": { -# "phpunit/php-code-coverage": "*", -# "phpunit/phpunit": "~4.8 || ~5.7" -BuildRequires: php-composer(phpunit/phpunit) >= 4.8 +# "phpstan/phpstan": "^0.12.37", +# "phpmyadmin/coding-standard": "^2.1.1", +# "phpstan/phpstan-phpunit": "^0.12.6", +# "phpunit/phpunit": "^7.4 || ^8 || ^9" +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +%global phpunit %{_bindir}/phpunit9 +BuildRequires: %{phpunit} +%else +%global phpunit %{_bindir}/phpunit8 +BuildRequires: %{phpunit} +%endif %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { -# "php": ">=5.4.0" -Requires: php(language) >= 5.4 +# "php": "^7.1 || ^8.0" +Requires: php(language) >= 7.1 # From phpcompatinfo report for 1.2 # nothing # From composer.json, "suggest": { @@ -64,7 +73,7 @@ documentation, making translations or offering new ideas please contact us. [1] https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf -Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php +Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep @@ -85,7 +94,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 @@ -93,13 +102,14 @@ cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php -require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php'; +require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php'; EOF ret=0 -for cmd in php php56 php72 php73 php74 php80; do +for cmd in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 "php74" php80; do if which $cmd; then - $cmd %{_bindir}/phpunit --no-coverage --verbose || ret=1 + set $cmd + $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose || ret=1 fi done exit $ret @@ -114,10 +124,17 @@ exit $ret %doc composer.json %doc *.md %dir %{_datadir}/php/%{ns_vendor}/ - %{_datadir}/php/%{ns_vendor}/%{ns_project} + %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major} %changelog +* Mon Feb 8 2021 Remi Collet <remi@remirepo.net> - 3.0.1-1 +- update to 3.0.1 +- rename to php-phpmyadmin-shapefile3 +- install in /usr/share/php/PhpMyAdmin/ShapeFile3 +- raise dependency on PHP 7.1 +- switch to phpunit9 + * Mon May 15 2017 Remi Collet <remi@remirepo.net> - 2.1-1 - Update to 2.1 |