mirror of
https://abf.rosa.ru/djam/jsoncpp.git
synced 2025-02-24 03:12:58 +00:00
81 lines
2.3 KiB
RPMSpec
81 lines
2.3 KiB
RPMSpec
%define major 26
|
|
%define libname %mklibname %{name} %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
Summary: C++ JSON Library
|
|
Name: jsoncpp
|
|
Version: 1.9.6
|
|
Release: 2
|
|
License: Public Domain
|
|
Group: System/Libraries
|
|
URL: https://github.com/open-source-parsers/jsoncpp
|
|
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
|
BuildRequires: cmake
|
|
|
|
%description
|
|
JsonCpp is a simple API to manipulate JSON value, handle serialization
|
|
and unserialization to string.
|
|
|
|
It can also preserve existing comment in unserialization/serialization steps,
|
|
making it a convenient format to store user input files.
|
|
|
|
Unserialization parsing is user friendly and provides precise error reports.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname}
|
|
Summary: JsonCpp library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
JsonCpp is a simple API to manipulate JSON value, handle serialization
|
|
and unserialization to string.
|
|
|
|
It can also preserve existing comment in unserialization/serialization steps,
|
|
making it a convenient format to store user input files.
|
|
|
|
Unserialization parsing is user friendly and provides precise error reports.
|
|
|
|
%files -n %{libname}
|
|
%doc README.md
|
|
%{_libdir}/lib%{name}.so.%{major}
|
|
%{_libdir}/lib%{name}.so.%{version}
|
|
%{_libdir}/objects-Release/jsoncpp_object/json_reader.cpp.o
|
|
%{_libdir}/objects-Release/jsoncpp_object/json_value.cpp.o
|
|
%{_libdir}/objects-Release/jsoncpp_object/json_writer.cpp.o
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development files for %{name}
|
|
Group: System/Libraries
|
|
Requires: %{libname} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
Files for building applications with %{name} support.
|
|
|
|
%files -n %{devname}
|
|
%{_libdir}/lib%{name}.so
|
|
%dir %{_includedir}/json
|
|
%{_includedir}/json/*.h
|
|
%dir %{_libdir}/cmake/jsoncpp/
|
|
%{_libdir}/cmake/jsoncpp/*
|
|
%{_libdir}/pkgconfig/jsoncpp.pc
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%cmake \
|
|
-DJSONCPP_LIB_BUILD_SHARED:BOOL=ON \
|
|
-DJSONCPP_LIB_BUILD_STATIC:BOOL=OFF \
|
|
-DJSONCPP_WITH_TESTS:BOOL=OFF \
|
|
-DJSONCPP_WITH_POST_BUILD_UNITTES:BOOL=OFF \
|
|
-DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON
|
|
%make
|
|
|
|
%install
|
|
%makeinstall_std -C build
|