From ba4df42740fdc7f619d100ef2d8f2c3fb6b20627 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 18 Nov 2021 13:26:01 +0100 Subject: update to 1.5.6 (SPDX 3.15) --- .gitignore | 2 ++ composer.json | 7 +++++-- php-composer-spdx-licenses-rpm.patch | 18 +++++++++--------- php-composer-spdx-licenses.spec | 15 ++++++++++----- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 1ab5c4f..01f0400 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/composer.json b/composer.json index 002ec1d..553b196 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,8 @@ "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" + "symfony/phpunit-bridge": "^4.2 || ^5", + "phpstan/phpstan": "^0.12.55" }, "autoload": { "psr-4": { @@ -51,6 +52,8 @@ } }, "scripts": { - "test": "phpunit" + "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit", + "phpstan": "vendor/bin/phpstan analyse", + "sync-licenses": "bin/update-spdx-licenses" } } diff --git a/php-composer-spdx-licenses-rpm.patch b/php-composer-spdx-licenses-rpm.patch index 3d8227e..f7b3f7a 100644 --- a/php-composer-spdx-licenses-rpm.patch +++ b/php-composer-spdx-licenses-rpm.patch @@ -1,7 +1,7 @@ -diff -up src/SpdxLicenses.php.rpm src/SpdxLicenses.php ---- src/SpdxLicenses.php.rpm 2015-09-08 09:17:14.000000000 +0200 -+++ src/SpdxLicenses.php 2015-09-08 09:19:33.416111340 +0200 -@@ -178,7 +178,7 @@ class SpdxLicenses +diff -up ./src/SpdxLicenses.php.rpm ./src/SpdxLicenses.php +--- ./src/SpdxLicenses.php.rpm 2021-11-18 13:15:53.000000000 +0100 ++++ ./src/SpdxLicenses.php 2021-11-18 13:22:10.402686746 +0100 +@@ -213,7 +213,7 @@ class SpdxLicenses */ public static function getResourcesDir() { @@ -9,11 +9,11 @@ diff -up src/SpdxLicenses.php.rpm src/SpdxLicenses.php + return (getenv('BUILDROOT_SPDX')?:'') . '/usr/share/php-composer-spdx-licenses'; } - private function loadLicenses() -diff -up tests/SpdxLicensesTest.php.rpm tests/SpdxLicensesTest.php ---- tests/SpdxLicensesTest.php.rpm 2015-09-08 09:20:20.453342020 +0200 -+++ tests/SpdxLicensesTest.php 2015-09-08 09:21:51.442788249 +0200 -@@ -64,12 +64,6 @@ class SpdxLicensesTest extends \PHPUnit_ + /** +diff -up ./tests/SpdxLicensesTest.php.rpm ./tests/SpdxLicensesTest.php +--- ./tests/SpdxLicensesTest.php.rpm 2021-11-18 13:15:53.000000000 +0100 ++++ ./tests/SpdxLicensesTest.php 2021-11-18 13:21:44.972772614 +0100 +@@ -75,12 +75,6 @@ class SpdxLicensesTest extends TestCase is_dir($dir), 'Expected resources directory to exist.' ); diff --git a/php-composer-spdx-licenses.spec b/php-composer-spdx-licenses.spec index 9570017..c56d505 100644 --- a/php-composer-spdx-licenses.spec +++ b/php-composer-spdx-licenses.spec @@ -1,12 +1,12 @@ # remirepo/fedora spec file for php-composer-spdx-licenses # -# Copyright (c) 2015-2020 Remi Collet +# Copyright (c) 2015-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit de30328a7af8680efdc03e396aad24befd513200 +%global gh_commit a30d487169d799745ca7280bc90fdfa693536901 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20150717 %global gh_owner composer @@ -15,7 +15,7 @@ %bcond_without tests Name: php-composer-spdx-licenses -Version: 1.5.5 +Version: 1.5.6 Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} Summary: SPDX licenses list and validation library @@ -72,7 +72,8 @@ now extracted and made available as a stand-alone library. %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p0 +%patch0 -p0 -b .rpm +find . -name \*.rpm -delete -print %build @@ -109,7 +110,7 @@ rm tests/SpdxLicensesUpdaterTest.php export BUILDROOT_SPDX=%{buildroot} ret=0 -for cmd in "php %{phpunit}" php72 php73 php74 php80; do +for cmd in "php %{phpunit}" php74 php80 php81; do if which $cmd; then set $cmd $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit7} \ @@ -125,6 +126,7 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc composer.json @@ -135,6 +137,9 @@ exit $ret %changelog +* Thu Nov 18 2021 Remi Collet - 1.5.6-1 +- update to 1.5.6 (SPDX 3.15) + * Fri Dec 4 2020 Remi Collet - 1.5.5-1 - update to 1.5.5 (SPDX 3.11) -- cgit