From d7d2e8af41d6ba7c5c7574f6692fcd83a9a09221 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 2 Oct 2018 11:04:45 +0200 Subject: update to 1.5.2 raise dependency on PHP 5.6 switch to phpunit6 fix LICENSE installation --- composer.json | 19 ++++++++++++--- php-simplepie-makesrc.sh | 2 +- php-simplepie.spec | 63 ++++++++++++++++++++++++++++++++++++------------ 3 files changed, 64 insertions(+), 20 deletions(-) diff --git a/composer.json b/composer.json index b5965b2..dd13461 100644 --- a/composer.json +++ b/composer.json @@ -24,17 +24,30 @@ } ], "require": { - "php": ">=5.3.0" + "php": ">=5.6.0", + "ext-pcre": "*", + "ext-xml": "*", + "ext-xmlreader": "*" }, "require-dev": { - "phpunit/phpunit": "~4 || ~5" + "phpunit/phpunit": "~5.4.3 || ~6.5" }, "suggest": { + "ext-curl": "", + "ext-iconv": "", + "ext-intl": "", + "ext-mbstring": "", "mf2/mf2": "Microformat module that allows for parsing HTML for microformats" }, "autoload": { "psr-0": { "SimplePie": "library" } - } + }, + "config": { + "bin-dir": "bin" + }, + "scripts": { + "test": "phpunit" + } } diff --git a/php-simplepie-makesrc.sh b/php-simplepie-makesrc.sh index a1e294f..fa1f97c 100755 --- a/php-simplepie-makesrc.sh +++ b/php-simplepie-makesrc.sh @@ -20,7 +20,7 @@ cp composer.json ../composer.json popd echo "Archiving..." -tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT +tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT echo "Cleaning..." rm -rf $PROJECT-$COMMIT diff --git a/php-simplepie.spec b/php-simplepie.spec index 0aba45b..e60947d 100644 --- a/php-simplepie.spec +++ b/php-simplepie.spec @@ -7,11 +7,11 @@ # # Please preserve changelog entries # -%global gh_commit db9fff27b6d49eed3d4047cd3211ec8dba2f5d6e +%global gh_commit 0e8fe72132dad765d25db4cabc69a91139af1263 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner simplepie %global gh_project simplepie -%global gh_version 1.5.1 +%global gh_version 1.5.2 %global with_tests 0%{!?_without_tests:1} Name: php-%{gh_project} @@ -33,21 +33,45 @@ Patch0: %{name}-rpm.patch BuildArch: noarch %if %{with_tests} +# From composer.json, "require-dev" +# "phpunit/phpunit": "~5.4.3 || ~6.5" +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: phpunit6 >= 6.5 +%global phpunit %{_bindir}/phpunit6 +# remirepo:4 +%else BuildRequires: php-phpunit-PHPUnit +%global phpunit %{_bindir}/phpunit +%endif %endif -Requires: php-IDNA_Convert +# from composer.json, "require" +# "php": ">=5.6.0", +# "ext-pcre": "*", +# "ext-xml": "*", +# "ext-xmlreader": "*" +Requires: php(language) >= 5.6 +Requires: php-pcre +Requires: php-xml +Requires: php-xmlreader +# from composer.json, "suggests" +# "ext-curl": "", +# "ext-iconv": "", +# "ext-intl": "", +# "ext-mbstring": "", Requires: php-curl +Requires: php-iconv +Requires: php-intl +Requires: php-mbstring +# from phpcompatinfo +Requires: php-IDNA_Convert Requires: php-date Requires: php-dom -Requires: php-iconv Requires: php-libxml -Requires: php-mbstring -Requires: php-pcre Requires: php-pdo Requires: php-reflection -Requires: php-xml -# Optional: memcache, memcached, redis, xmlreader, zlib +# Optional: memcache, memcached, redis, zlib Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} @@ -89,14 +113,11 @@ install -pm 644 autoloader.php \ sed -e 's:@PATH@:%{buildroot}/%{_datadir}/php/%{name}:' \ -i tests/bootstrap.php -# Known failed test with PHP 7+ -rm tests/IRITest.php -rm tests/oldtests/first_item_title/SPtests/bugs/179.0.10.php - ret=0 -for cmd in php php56 php70 php71 php72; do - if which $cmd; then - $cmd %{_bindir}/phpunit --verbose || ret=1 +for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72 php73; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 fi done exit $ret @@ -104,11 +125,21 @@ exit $ret %files -%doc LICENSE.txt +%{!?_licensedir:%global license %%doc} +%license LICENSE.txt +%doc composer.json +%doc README.markdown +%doc ROADMAP.md %{_datadir}/php/%{name} %changelog +* Tue Oct 2 2018 Remi Collet - 1.5.2-1 +- update to 1.5.2 +- raise dependency on PHP 5.6 +- switch to phpunit6 +- fix LICENSE installation + * Tue Nov 14 2017 Remi Collet - 1.5.1-1 - Update to 1.5.1 -- cgit