2014-07-26 11:41:43 +02:00
|
|
|
#
|
2014-12-12 14:26:32 +01:00
|
|
|
# spec file for package jsoncpp
|
2014-07-26 11:41:43 +02:00
|
|
|
#
|
2017-01-02 16:46:06 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-07-26 11:41:43 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2014-12-12 14:26:32 +01:00
|
|
|
|
2016-10-07 12:22:12 +02:00
|
|
|
%define sover 11
|
2014-07-26 11:41:43 +02:00
|
|
|
Name: jsoncpp
|
2017-01-02 16:46:06 +01:00
|
|
|
Version: 1.8.0
|
2014-07-26 11:41:43 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: C++ library that allows manipulating with JSON
|
2014-12-12 14:26:32 +01:00
|
|
|
License: MIT
|
2015-03-06 19:19:09 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2014-12-12 14:26:32 +01:00
|
|
|
Url: https://github.com/open-source-parsers/jsoncpp
|
2016-06-30 10:49:01 +02:00
|
|
|
Source0: https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2017-01-02 16:58:01 +01:00
|
|
|
BuildRequires: cmake >= 3.1
|
2014-07-26 11:41:43 +02:00
|
|
|
BuildRequires: gcc-c++
|
2016-06-30 10:49:01 +02:00
|
|
|
BuildRequires: pkgconfig
|
2014-07-26 11:41:43 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
JSON is a lightweight data-interchange format. It can represent numbers,
|
|
|
|
strings, ordered sequences of values, and collections of name/value pairs.
|
|
|
|
|
|
|
|
JsonCpp is a C++ library that allows manipulating JSON values, including
|
|
|
|
serialization and deserialization to and from strings. It can also preserve
|
|
|
|
existing comment in unserialization/serialization steps, making it a convenient
|
|
|
|
format to store user input files.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Languages/C and C++
|
2016-07-23 09:36:43 +02:00
|
|
|
Requires: lib%{name}%{sover} = %{version}
|
2014-07-26 11:41:43 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
JSON is a lightweight data-interchange format. It can represent numbers,
|
|
|
|
strings, ordered sequences of values, and collections of name/value pairs.
|
|
|
|
|
|
|
|
JsonCpp is a C++ library that allows manipulating JSON values, including
|
|
|
|
serialization and deserialization to and from strings. It can also preserve
|
|
|
|
existing comment in unserialization/serialization steps, making it a convenient
|
|
|
|
format to store user input files.
|
|
|
|
|
2016-07-23 09:36:43 +02:00
|
|
|
%package -n lib%{name}%{sover}
|
2014-07-26 11:41:43 +02:00
|
|
|
Summary: Shared library for %{name}
|
2014-12-20 18:33:10 +01:00
|
|
|
Group: System/Libraries
|
2014-07-26 11:41:43 +02:00
|
|
|
|
2016-07-23 09:36:43 +02:00
|
|
|
%description -n lib%{name}%{sover}
|
2014-07-26 11:41:43 +02:00
|
|
|
JSON is a lightweight data-interchange format. It can represent numbers,
|
|
|
|
strings, ordered sequences of values, and collections of name/value pairs.
|
|
|
|
|
|
|
|
JsonCpp is a C++ library that allows manipulating JSON values, including
|
|
|
|
serialization and deserialization to and from strings. It can also preserve
|
|
|
|
existing comment in unserialization/serialization steps, making it a convenient
|
|
|
|
format to store user input files.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2015-03-09 09:47:04 +01:00
|
|
|
%cmake \
|
2017-01-02 16:58:01 +01:00
|
|
|
-DBUILD_STATIC_LIBS=OFF \
|
|
|
|
-DJSONCPP_WITH_CMAKE_PACKAGE=ON \
|
|
|
|
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
|
2016-10-07 12:30:16 +02:00
|
|
|
%make_jobs
|
2014-07-26 11:41:43 +02:00
|
|
|
|
|
|
|
%install
|
2014-12-12 14:26:32 +01:00
|
|
|
%cmake_install
|
2017-01-02 16:58:01 +01:00
|
|
|
|
|
|
|
%check
|
|
|
|
# path needs to be exported otherwise unit tests will fail
|
2017-06-21 12:32:59 +02:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}
|
2017-01-02 16:58:01 +01:00
|
|
|
./build/src/test_lib_json/jsoncpp_test
|
2014-07-26 11:41:43 +02:00
|
|
|
|
2016-07-23 09:36:43 +02:00
|
|
|
%post -n lib%{name}%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
|
2014-07-26 11:41:43 +02:00
|
|
|
|
2016-07-23 09:36:43 +02:00
|
|
|
%files -n lib%{name}%{sover}
|
2014-07-26 11:41:43 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSE
|
2016-10-07 12:30:16 +02:00
|
|
|
%{_libdir}/lib%{name}.so.%{sover}*
|
|
|
|
%{_libdir}/lib%{name}.so.%{version}
|
2014-07-26 11:41:43 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS LICENSE NEWS.txt README.md
|
2014-12-12 14:26:32 +01:00
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
2015-03-09 09:47:04 +01:00
|
|
|
%{_libdir}/cmake/%{name}
|
2014-07-26 11:41:43 +02:00
|
|
|
%{_libdir}/lib%{name}.so
|
2014-12-12 14:26:32 +01:00
|
|
|
%{_includedir}/json/
|
2014-07-26 11:41:43 +02:00
|
|
|
|
|
|
|
%changelog
|