Add rpm conditionals : tests

Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
This commit is contained in:
Owen Synge 2015-05-29 13:33:13 +02:00
parent c65538f489
commit 5747ea1910

View File

@ -1,5 +1,6 @@
%bcond_with ocf
%bcond_without cephfs_java
%bcond_with tests
%if (0%{?el5} || (0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 600))
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@ -516,6 +517,16 @@ sed -i -e "s/-lcurses/-lncurses/g" src/java/Makefile
make -j$(getconf _NPROCESSORS_ONLN)
%if 0%{with tests}
%check
# run in-tree unittests
make -j$(getconf _NPROCESSORS_ONLN) check-local
%endif
%install
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'