From a7f7d748d0120bf7ff41aa8a783dab1e1a21cd61 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 1 Dec 2023 10:17:35 +0100 Subject: provide phpunit command --- phpunit10.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'phpunit10.spec') diff --git a/phpunit10.spec b/phpunit10.spec index fed5eb0..2b6517c 100644 --- a/phpunit10.spec +++ b/phpunit10.spec @@ -14,6 +14,12 @@ %bcond_without tests +%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 +%bcond_without defcmd +%else +%bcond_with defcmd +%endif + %global gh_commit 80cab181aebc2efac422940443e28db556137637 #global gh_date 20150927 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) @@ -277,6 +283,10 @@ mkdir %{buildroot}%{php_home}/%{ns_vendor}/Extensions install -D -p -m 755 phpunit %{buildroot}%{_bindir}/%{name} install -p -m 644 phpunit.xsd %{buildroot}%{php_home}/%{ns_vendor}/phpunit.xsd +%if %{with defcmd} +ln -s %{name} %{buildroot}%{_bindir}/phpunit +%endif + %if %{with tests} %check @@ -302,12 +312,16 @@ exit $ret %doc README.md ChangeLog-%{ver_major}.%{ver_minor}.md %doc composer.json %{_bindir}/%{name} +%if %{with defcmd} +%{_bindir}/phpunit +%endif %{php_home}/%{ns_vendor} %changelog * Fri Dec 1 2023 Remi Collet - 10.5.0-1 - update to 10.5.0 +- provide phpunit command * Thu Oct 26 2023 Remi Collet - 10.4.2-1 - update to 10.4.2 -- cgit