SHA256
8
0
forked from pool/jsoncpp

- Execute tests in check section

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jsoncpp?expand=0&rev=40
This commit is contained in:
2017-01-02 15:58:01 +00:00
committed by Git OBS Bridge
parent 5b07616369
commit e83d0603ae
2 changed files with 10 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ Mon Jan 2 15:42:49 UTC 2017 - mpluskal@suse.com
- Update to version 1.8.0: - Update to version 1.8.0:
* Build related changes, minimal required cmake is 3.1 * Build related changes, minimal required cmake is 3.1
- Execute tests in check section
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 14 06:59:15 UTC 2016 - olaf@aepfle.de Fri Oct 14 06:59:15 UTC 2016 - olaf@aepfle.de

View File

@@ -25,7 +25,7 @@ License: MIT
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Url: https://github.com/open-source-parsers/jsoncpp Url: https://github.com/open-source-parsers/jsoncpp
Source0: https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source0: https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake >= 3.1.0 BuildRequires: cmake >= 3.1
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -71,14 +71,18 @@ format to store user input files.
%build %build
%cmake \ %cmake \
-DJSONCPP_WITH_CMAKE_PACKAGE=ON -DBUILD_STATIC_LIBS=OFF \
# path needs to be exported otherwise unit tests will fail -DJSONCPP_WITH_CMAKE_PACKAGE=ON \
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/src/lib_json -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
%make_jobs %make_jobs
%install %install
%cmake_install %cmake_install
rm -rf %{buildroot}%{_libdir}/lib%{name}.a
%check
# path needs to be exported otherwise unit tests will fail
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/src/lib_json
./build/src/test_lib_json/jsoncpp_test
%post -n lib%{name}%{sover} -p /sbin/ldconfig %post -n lib%{name}%{sover} -p /sbin/ldconfig
%postun -n lib%{name}%{sover} -p /sbin/ldconfig %postun -n lib%{name}%{sover} -p /sbin/ldconfig