SHA256
8
0
forked from pool/jsoncpp
Files
jsoncpp/jsoncpp.spec
Martin Pluskal cc8184ff3a Accepting request 559520 from home:avindra
- Update to version 1.8.4:
  * Functional changes
    - Serialize UTF-8 string with Unicode escapes
      + Breaks code that relies on not Unicode-escaping encoding
        strings. A future release may allow skipping all Unicode
	escape.
    - Un-deprecate removeMember overloads, return void
    - Allow Json::Value to be used in a boolean context
    - Use move ctor in append()
    - Add value_type to improve integration with boost
  * Meta-changes
    - Fix meson.build to allow using jsoncpp as a subproject
    - Fix some compiler warnings
    - Update docs

OBS-URL: https://build.opensuse.org/request/show/559520
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jsoncpp?expand=0&rev=49
2017-12-23 08:19:39 +00:00

102 lines
3.4 KiB
RPMSpec

#
# spec file for package jsoncpp
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
%define sover 19
Name: jsoncpp
Version: 1.8.4
Release: 0
Summary: C++ library that allows manipulating with JSON
License: MIT
Group: Development/Libraries/C and C++
Url: https://github.com/open-source-parsers/jsoncpp
Source0: https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake >= 3.1
BuildRequires: gcc-c++
BuildRequires: pkgconfig
%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++
Requires: lib%{name}%{sover} = %{version}
%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.
%package -n lib%{name}%{sover}
Summary: Shared library for %{name}
Group: System/Libraries
%description -n lib%{name}%{sover}
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
%cmake \
-DBUILD_STATIC_LIBS=OFF \
-DJSONCPP_WITH_CMAKE_PACKAGE=ON \
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
%make_jobs
%install
%cmake_install
%check
# path needs to be exported otherwise unit tests will fail
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}
./build/src/test_lib_json/jsoncpp_test
%post -n lib%{name}%{sover} -p /sbin/ldconfig
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
%files -n lib%{name}%{sover}
%doc LICENSE
%{_libdir}/lib%{name}.so.%{sover}*
%{_libdir}/lib%{name}.so.%{version}
%files devel
%doc AUTHORS LICENSE README.md
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/%{name}
%{_libdir}/lib%{name}.so
%{_includedir}/json/
%changelog