From d9dbeccb2c4991472fe3854ec5696a5d1c22dc03 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 4 Jan 2018 08:27:37 +0100 Subject: Update to 1.2.0 use phpunit6 on Fedora --- php-composer-spdx-licenses.spec | 60 ++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 28 deletions(-) (limited to 'php-composer-spdx-licenses.spec') diff --git a/php-composer-spdx-licenses.spec b/php-composer-spdx-licenses.spec index 8d54696..ffd9bdd 100644 --- a/php-composer-spdx-licenses.spec +++ b/php-composer-spdx-licenses.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 2603a0d7ddc00a015deb576fa5297ca43dee6b1c +%global gh_commit 2d899e9b33023c631854f36c39ef9f8317a7ab33 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20150717 %global gh_owner composer @@ -15,7 +15,7 @@ %global with_tests 0%{!?_without_tests:1} Name: php-composer-spdx-licenses -Version: 1.1.6 +Version: 1.2.0 Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} Summary: SPDX licenses list and validation library @@ -25,7 +25,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} # git snapshot to get upstream test suite Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -Source2: %{name}-autoload.php # Resources path Patch0: %{name}-rpm.patch @@ -38,10 +37,16 @@ BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-spl # From composer.json, "require-dev": { -# "phpunit/phpunit": "phpunit/phpunit": "^4.5 || ^5.0.5", +# "phpunit/phpunit": "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", # "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" -BuildRequires: php-composer(phpunit/phpunit) >= 4.5 -BuildRequires: php-composer(phpunit/phpunit-mock-objects) >= 2.3 +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +# ignore min version, test suite passes with 6.4 +BuildRequires: phpunit6 >= 6.4 +%else +%global phpunit %{_bindir}/phpunit +BuildRequires: php-phpunit-PHPUnit >= 4.8.35 +%endif # Autoloader BuildRequires: php-composer(fedora/autoloader) %endif @@ -49,7 +54,7 @@ BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": "^5.3.2 || ^7.0", Requires: php(language) >= 5.3.2 -# From phpcompatinfo report for version 1.0.0 (SpdxLicenses.php only) +# From phpcompatinfo report for version 1.6.0 (SpdxLicenses.php only) Requires: php-json Requires: php-pcre Requires: php-spl @@ -70,11 +75,17 @@ now extracted and made available as a stand-alone library. %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p0 -cp %{SOURCE2} src/autoload.php %build -# Empty build section, most likely nothing required. +: Create autoloader +cat <<'AUTOLOAD' | tee src/autoload.php + - 1.2.0-1 +- Update to 1.2.0 +- use phpunit6 on Fedora + * Tue Apr 4 2017 Remi Collet - 1.1.6-1 - Update to 1.1.6 -- cgit