summaryrefslogtreecommitdiffstats
path: root/php-composer-spdx-licenses.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-composer-spdx-licenses.spec')
-rw-r--r--php-composer-spdx-licenses.spec60
1 files changed, 40 insertions, 20 deletions
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)