diff options
author | Remi Collet <remi@remirepo.net> | 2018-05-29 07:26:49 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-05-29 07:26:49 +0200 |
commit | 40de4bc441730dca30cef95b97152ccb2fdd13f8 (patch) | |
tree | 7e898a66792b48b92bebc281235390b2512eeb7c /php-phpunit-php-file-iterator2.spec | |
parent | 95211486c2c660385d1579427c601fce65e4ef27 (diff) |
update to 2.0.0
raise dependency on PHP 7.1
rename to php-phpunit-php-file-iterator2
move to /usr/share/php/SebastianBergmann/FileIterator2
Diffstat (limited to 'php-phpunit-php-file-iterator2.spec')
-rw-r--r-- | php-phpunit-php-file-iterator2.spec | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/php-phpunit-php-file-iterator2.spec b/php-phpunit-php-file-iterator2.spec index 149801c..c186e2d 100644 --- a/php-phpunit-php-file-iterator2.spec +++ b/php-phpunit-php-file-iterator2.spec @@ -1,49 +1,50 @@ -# remirepo/fedora spec file for php-phpunit-File-Iterator +# remirepo/fedora spec file for php-phpunit-php-file-iterator2 # -# Copyright (c) 2009-2015 Christof Damian, Remi Collet +# Copyright (c) 2009-2018 Christof Damian, Remi Collet # # License: MIT # http://opensource.org/licenses/MIT # # Please, preserve the changelog entries # -%global gh_commit 730b01bc3e867237eaac355e06a36b85dd93a8b4 +%global gh_commit e20525b0c2945c7c317fff95660698cb3d2a53bc %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project php-file-iterator %global php_home %{_datadir}/php -%global pear_name File_Iterator -%global pear_channel pear.phpunit.de -# Circular dependency with phpunit -%global with_tests %{?_with_tests:1}%{!?_with_tests:0} +# Packagist +%global pk_vendor phpunit +%global pk_project %{gh_project} +%global major 2 +# Namespace +%global ns_vendor SebastianBergmann +%global ns_project FileIterator -Name: php-phpunit-File-Iterator -Version: 1.4.5 + +Name: php-%{pk_vendor}-%{pk_project}%{major} +Version: 2.0.0 Release: 1%{?dist} Summary: FilterIterator implementation that filters files based on a list of suffixes -Group: Development/Libraries License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch -BuildRequires: php(language) >= 5.3.3 +BuildRequires: php(language) >= 7.1 +BuildRequires: php-cli BuildRequires: php-fedora-autoloader-devel # From composer.json -# "php": ">=5.3.3" -Requires: php(language) >= 5.3.3 -# From phpcompatinfo report for 1.3.4 +# "php": "^7.1" +Requires: php(language) >= 7.1 +# From phpcompatinfo report for 2.0.0 Requires: php-pcre Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) -Provides: php-composer(phpunit/php-file-iterator) = %{version} - -# For compatibility with PEAR mode -Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} +Provides: php-composer(%{pk_vendor}/php-file-iterator) = %{version} %description @@ -53,40 +54,42 @@ FilterIterator implementation that filters files based on a list of suffixes. %prep %setup -q -n %{gh_project}-%{gh_commit} -# Restore PSR-0 tree -# see https://github.com/sebastianbergmann/php-file-iterator/issues/26 -mkdir -p File/Iterator/ -mv src/* File/Iterator/ -mv File/Iterator/Iterator.php File/Iterator.php - %build %{_bindir}/phpab \ --template fedora \ - --output File/Iterator/Autoload.php \ - File + --output src/autoload.php \ + src %install -mkdir -p %{buildroot}%{php_home} -cp -pr File %{buildroot}%{php_home}/File +mkdir -p %{buildroot}%{php_home}/%{ns_vendor} +cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} -%post -if [ -x %{_bindir}/pear ]; then - %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \ - %{pear_channel}/%{pear_name} >/dev/null || : -fi +%check +: Minimal test for our autoloader +php -r ' +require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php"; +exit(class_exists("SebastianBergmann\FileIterator\\Iterator") ? 0 : 1); +' %files %{!?_licensedir:%global license %%doc} %license LICENSE %doc ChangeLog.md README.md composer.json -%{php_home}/File +%dir %{php_home}/%{ns_vendor} + %{php_home}/%{ns_vendor}/%{ns_project}%{major} %changelog +* Tue May 29 2018 Remi Collet <remi@remirepo.net> - 2.0.0-1 +- update to 2.0.0 +- raise dependency on PHP 7.1 +- rename to php-phpunit-php-file-iterator2 +- move to /usr/share/php/SebastianBergmann/FileIterator2 + * Tue Nov 28 2017 Remi Collet <remi@remirepo.net> - 1.4.5-1 - Update to 1.4.5 |