From 89a0f539a11e5d1d04469813235c667b62d40aec Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 21 Apr 2023 10:33:20 +0200 Subject: use SPDX License id --- php-sebastian-recursion-context3.spec | 44 ++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'php-sebastian-recursion-context3.spec') diff --git a/php-sebastian-recursion-context3.spec b/php-sebastian-recursion-context3.spec index 6d2f86f..eee9181 100644 --- a/php-sebastian-recursion-context3.spec +++ b/php-sebastian-recursion-context3.spec @@ -1,7 +1,7 @@ # remirepo/fedora spec file for php-sebastian-recursion-context3 # -# Copyright (c) 2015-2017 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 @@ -13,6 +13,8 @@ %global gh_project recursion-context %global pk_vendor sebastian %global pk_project %{gh_project} +%global ns_vendor SebastianBergmann +%global ns_project RecursionContext %global major 3 %global php_home %{_datadir}/php %if %{bootstrap} @@ -21,12 +23,14 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} %endif +# NOTICE: used by phpunit 6, 7 and 8 + Name: php-%{pk_vendor}-%{pk_project}%{major} Version: 3.0.1 -Release: 1%{?dist} -Summary: Recursively process PHP variables +Release: 8%{?dist} +Summary: Recursively process PHP variables, version %{major} -License: BSD +License: BSD-3-Clause URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz @@ -36,7 +40,7 @@ BuildRequires: php-fedora-autoloader-devel %if %{with_tests} # from composer.json, "require-dev": { # "phpunit/phpunit": "^6.0" -BuildRequires: phpunit6 +BuildRequires: phpunit8 %endif # from composer.json @@ -53,6 +57,10 @@ Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} %description Provides functionality to recursively process PHP variables. +This package provides the version %{major} of the library. + +Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php + %prep %setup -q -n %{gh_project}-%{gh_commit} @@ -64,8 +72,8 @@ Provides functionality to recursively process PHP variables. %install -mkdir -p %{buildroot}%{php_home}/SebastianBergmann -cp -pr src %{buildroot}%{php_home}/SebastianBergmann/RecursionContext%{major} +mkdir -p %{buildroot}%{php_home}/%{ns_vendor} +cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} %check @@ -73,12 +81,15 @@ cp -pr src %{buildroot}%{php_home}/SebastianBergmann/RecursionContext%{major} mkdir vendor touch vendor/autoload.php +: Fix for phpunit8 +find tests/ -name \*php -exec sed -e 's/setUp()/setUp():void/' -i {} \; + : Run upstream test suite ret=0 -for cmd in php php72 php73 php74 php80; do +for cmd in php php80 php81 php82; do if which $cmd; then - %{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ - %{_bindir}/phpunit6 --verbose || ret=1 + %{_bindir}/php -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ + %{_bindir}/phpunit8 --verbose || ret=1 fi done exit $ret @@ -88,14 +99,21 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.md composer.json -%dir %{php_home}/SebastianBergmann - %{php_home}/SebastianBergmann/RecursionContext%{major} +%dir %{php_home}/%{ns_vendor} + %{php_home}/%{ns_vendor}/%{ns_project}%{major} %changelog +* Fri Apr 21 2023 Remi Collet - 3.0.1-8 +- use SPDX License id + +* Wed Mar 10 2021 Remi Collet - 3.0.1-3 +- switch to phpunit8 + * Mon Nov 30 2020 Remi Collet - 3.0.1-1 - update to 3.0.1 (no change) -- cgit