From baf10231f3800a6c07fc1dc131cdcb242b3e94a9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 24 Mar 2015 15:50:22 +0100 Subject: atoum: backport to remi repo --- atoum.spec | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'atoum.spec') diff --git a/atoum.spec b/atoum.spec index 9b0dff7..d70a56a 100644 --- a/atoum.spec +++ b/atoum.spec @@ -8,6 +8,7 @@ License: BSD URL: http://atoum.org Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3.3 @@ -37,6 +38,12 @@ Requires: php-xml Provides: php-composer(atoum/atoum) = %{version} +%if %{?runselftest}%{!?runselftest:1} +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} +%else +%global with_tests %{?_with_tests:1}%{!?_with_tests:0} +%endif + %description A simple, modern and intuitive unit testing framework for PHP! @@ -79,6 +86,7 @@ sed -i bin/%{name} \ %install +rm -rf $RPM_BUILD_ROOT # create needed directories mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_bindir} @@ -91,6 +99,7 @@ cp -pr tests $RPM_BUILD_ROOT%{_datadir}/%{name} %check +%if %{with_tests} %if 0%{?fedora} >= 22 # Temporary ignore this test, BC break in libxml, see # https://bugzilla.redhat.com/1199396 incorrect identification of duplicate ID @@ -102,9 +111,17 @@ cd tests/units echo "date.timezone=UTC" >php.ini export PHPRC=$(pwd)/php.ini php runner.php --directories . +%else +: Tests skipped +%endif + + +%clean +rm -rf $RPM_BUILD_ROOT %files +%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license COPYING %doc ABOUT composer.json CREDITS.md FAQ.md README.md @@ -114,6 +131,9 @@ php runner.php --directories . %changelog +* Tue Mar 24 2015 Remi Collet - 2.0.1-1 +- add backport stuff + * Sun Mar 22 2015 Johan Cwiklinski - 2.0.1-1 - Last upstream release -- cgit