summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-09 08:21:09 +0200
committerRemi Collet <remi@php.net>2026-04-09 08:21:09 +0200
commita1a9eba97165a35d10d3728aa6d56ecbd38632e4 (patch)
tree66b534b22062e1758f1ff35b5c7ea3626348e9ba
parent35d1df9f4d7c355d7df40cdac16e093b0ab78bec (diff)
update to 1.5.9 (SPDX 3.28.0)
switch to phpunit10
-rw-r--r--composer.json4
-rwxr-xr-xmakesrc.sh33
-rw-r--r--php-composer-spdx-licenses.spec40
3 files changed, 36 insertions, 41 deletions
diff --git a/composer.json b/composer.json
index e1701c0..a3b4ad9 100644
--- a/composer.json
+++ b/composer.json
@@ -30,10 +30,10 @@
"issues": "https://github.com/composer/spdx-licenses/issues"
},
"require": {
- "php": "^5.3.2 || ^7.0 || ^8.0"
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^3 || ^7",
+ "symfony/phpunit-bridge": "^6.4.25 || ^7.3.3 || ^8.0",
"phpstan/phpstan": "^1.11"
},
"autoload": {
diff --git a/makesrc.sh b/makesrc.sh
index c047df5..5ee81b4 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -1,27 +1,28 @@
#!/bin/bash
-NAME=$(sed -n '/^Name:/{s/.* //;p}' *.spec)
+NAME=$(basename $PWD)
OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
-COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
-SHORT=${COMMIT:0:7}
-echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
+if [ -f $NAME-$VERSION.tgz ]; then
+ echo "$NAME-$VERSION.tgz already there"
+else
+ echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION \n"
-echo "Cloning..."
-git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
+ echo "Cloning..."
+ rm -rf $PROJECT-$VERSION
+ git clone https://github.com/$OWNER/$PROJECT.git --depth 1 --branch $VERSION $PROJECT-$VERSION || exit 1
-echo "Getting commit..."
-pushd $PROJECT-$COMMIT
-git checkout $COMMIT
-cp composer.json ../composer.json
-popd
+ echo "Getting composer..."
+ cp $PROJECT-$VERSION/composer.json composer.json
-echo "Archiving..."
-tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+ echo "Archiving..."
+ # dont use --exclude-vcs as we need .gitattributes
+ tar czf $NAME-$VERSION.tgz --exclude .git $PROJECT-$VERSION
-echo "Cleaning..."
-rm -rf $PROJECT-$COMMIT
+ echo "Cleaning..."
+ rm -rf $PROJECT-$VERSION
-echo "Done."
+ echo "Done."
+fi
diff --git a/php-composer-spdx-licenses.spec b/php-composer-spdx-licenses.spec
index 1037d9a..355a7ee 100644
--- a/php-composer-spdx-licenses.spec
+++ b/php-composer-spdx-licenses.spec
@@ -1,28 +1,25 @@
# remirepo/fedora spec file for php-composer-spdx-licenses
#
-# SPDX-FileCopyrightText: Copyright 2015-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2015-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-%global gh_commit edf364cefe8c43501e21e88110aac10b284c3c9f
-%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
%bcond_without tests
Name: php-composer-spdx-licenses
-Version: 1.5.9
-Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
+Version: 1.6.0
+Release: 1%{?dist}
Summary: SPDX licenses list and validation library
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
# git snapshot to get upstream test suite
-Source0: %{name}-%{version}-%{gh_short}.tgz
+Source0: %{name}-%{version}.tgz
Source1: makesrc.sh
# Resources path
@@ -31,25 +28,21 @@ Patch0: %{name}-rpm.patch
BuildArch: noarch
%if %{with tests}
# For tests
-BuildRequires: php(language) >= 5.3.2
+BuildRequires: php(language) >= 7.2
BuildRequires: php-json
-BuildRequires: php-pcre
-BuildRequires: php-spl
# From composer.json, "require-dev": {
-# "symfony/phpunit-bridge": "^3 || ^7",
+# "symfony/phpunit-bridge": "^6.4.25 || ^7.3.3 || ^8.0",
# "phpstan/phpstan": "^1.11"
-BuildRequires: phpunit9
+BuildRequires: phpunit10
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": "^5.3.2 || ^7.0 || ^8.0",
-Requires: php(language) >= 5.3.2
+# "php": "^7.2 || ^8.0",
+Requires: php(language) >= 7.2
# From phpcompatinfo report for version 1.6.0 (SpdxLicenses.php only)
Requires: php-json
-Requires: php-pcre
-Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -64,7 +57,7 @@ now extracted and made available as a stand-alone library.
%prep
-%setup -q -n %{gh_project}-%{gh_commit}
+%setup -q -n %{gh_project}-%{version}
%patch -P0 -p0 -b .rpm
find . -name \*.rpm -delete -print
@@ -103,16 +96,13 @@ 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 php81 php82 php83 php84; do
+for cmd in php php82 php83 php84 php85; do
if which $cmd; then
- $cmd -d memory_limit=1G ${2:-%{_bindir}/phpunit9} \
+ $cmd -d memory_limit=1G %{_bindir}/phpunit10 \
--bootstrap %{buildroot}%{php_home}/Composer/Spdx/autoload.php \
--no-coverage \
- --verbose || ret=1
+ || ret=1
fi
done
exit $ret
@@ -131,6 +121,10 @@ exit $ret
%changelog
+* Thu Apr 9 2026 Remi Collet <remi@remirepo.net> - 1.5.9-1
+- update to 1.5.9 (SPDX 3.28.0)
+- switch to phpunit10
+
* Tue May 13 2025 Remi Collet <remi@remirepo.net> - 1.5.9-1
- update to 1.5.9 (SPDX 3.26.0)
- re-license spec file to CECILL-2.1