summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--composer.json11
-rw-r--r--php-composer-spdx-licenses-rpm.patch18
-rw-r--r--php-composer-spdx-licenses.spec60
4 files changed, 58 insertions, 33 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 bda5b2b..dd30895 100644
--- a/composer.json
+++ b/composer.json
@@ -26,14 +26,15 @@
}
],
"support": {
- "irc": "irc://irc.freenode.org/composer",
+ "irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/spdx-licenses/issues"
},
"require": {
"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": {
@@ -47,10 +48,12 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"
+ "dev-main": "1.x-dev"
}
},
"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 e5915fa..38d11dd 100644
--- a/php-composer-spdx-licenses.spec
+++ b/php-composer-spdx-licenses.spec
@@ -1,21 +1,21 @@
# remirepo/fedora spec file for php-composer-spdx-licenses
#
-# Copyright (c) 2015-2019 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2015-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit a1aa51cf3ab838b83b0867b14e56fc20fbd55b3d
+%global gh_commit 560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner composer
%global gh_project spdx-licenses
%global php_home %{_datadir}/php
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
Name: php-composer-spdx-licenses
-Version: 1.5.1
+Version: 1.5.8
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: SPDX licenses list and validation library
@@ -29,7 +29,7 @@ Source1: makesrc.sh
Patch0: %{name}-rpm.patch
BuildArch: noarch
-%if %{with_tests}
+%if %{with tests}
# For tests
BuildRequires: php(language) >= 5.3.2
BuildRequires: php-json
@@ -37,14 +37,8 @@ BuildRequires: php-pcre
BuildRequires: php-spl
# From composer.json, "require-dev": {
# "phpunit/phpunit": "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7",
-%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
-%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
+# ignore min version, test suite passes with 9.6.13
+BuildRequires: phpunit9
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
@@ -72,7 +66,8 @@ now extracted and made available as a stand-alone library.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p0
+%patch -P0 -p0 -b .rpm
+find . -name \*.rpm -delete -print
%build
@@ -102,17 +97,19 @@ cp -pr res %{buildroot}%{_datadir}/%{name}
%check
-%if %{with_tests}
+%if %{with tests}
# ignored as related class not installed
rm tests/SpdxLicensesUpdaterTest.php
export BUILDROOT_SPDX=%{buildroot}
+# compatibility with recent PHPUnit
+sed -e '/setUp()/s/$/:void/' -i tests/*.php
+
ret=0
-for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72 php73; do
+for cmd in php php80 php81 php82 php83; do
if which $cmd; then
- set $cmd
- $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} \
+ $cmd -d memory_limit=1G ${2:-%{_bindir}/phpunit9} \
--bootstrap %{buildroot}%{php_home}/Composer/Spdx/autoload.php \
--no-coverage \
--verbose || ret=1
@@ -125,6 +122,7 @@ exit $ret
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json
@@ -135,8 +133,30 @@ exit $ret
%changelog
+* Mon Nov 20 2023 Remi Collet <remi@remirepo.net> - 1.5.8-1
+- update to 1.5.8 (SPDX 3.22)
+- switch to phpunit9
+
+* Mon May 23 2022 Remi Collet <remi@remirepo.net> - 1.5.7-1
+- update to 1.5.7 (SPDX 3.17)
+
+* Thu Nov 18 2021 Remi Collet <remi@remirepo.net> - 1.5.6-1
+- update to 1.5.6 (SPDX 3.15)
+
+* Fri Dec 4 2020 Remi Collet <remi@remirepo.net> - 1.5.5-1
+- update to 1.5.5 (SPDX 3.11)
+
+* Thu Jul 16 2020 Remi Collet <remi@remirepo.net> - 1.5.4-1
+- update to 1.5.4 (SPDX 3.9)
+
+* Fri Feb 14 2020 Remi Collet <remi@remirepo.net> - 1.5.3-1
+- update to 1.5.3 (SPDX 3.8)
+
+* Thu Aug 1 2019 Remi Collet <remi@remirepo.net> - 1.5.2-1
+- update to 1.5.2 (SPDX 3.6)
+
* Tue Mar 26 2019 Remi Collet <remi@remirepo.net> - 1.5.1-1
-- update to 1.5.1
+- update to 1.5.1 (SPDX 3.4)
* Fri Nov 2 2018 Remi Collet <remi@remirepo.net> - 1.5.0-1
- update to 1.5.0 (SPDX 3.3)