summaryrefslogtreecommitdiffstats
path: root/atoum.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-03-24 15:50:22 +0100
committerRemi Collet <fedora@famillecollet.com>2015-03-24 15:50:22 +0100
commitbaf10231f3800a6c07fc1dc131cdcb242b3e94a9 (patch)
treef1574cc770731c44a12d21885527da573cb0692a /atoum.spec
parent89ae39135a49138eade2b9bbe3e9719e1442ce1a (diff)
atoum: backport to remi repo
Diffstat (limited to 'atoum.spec')
-rw-r--r--atoum.spec20
1 files changed, 20 insertions, 0 deletions
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 <RPMS@famillecollet.com> - 2.0.1-1
+- add backport stuff
+
* Sun Mar 22 2015 Johan Cwiklinski <johan AT x-tnd DOT be> - 2.0.1-1
- Last upstream release