jsoncpp/jsoncpp.spec

79 lines
2.1 KiB
RPMSpec
Raw Normal View History

%define major 19
2014-06-10 02:37:11 +11:00
%define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d
2012-02-01 14:16:09 +04:00
Summary: C++ JSON Library
2014-06-10 02:37:11 +11:00
Name: jsoncpp
2025-02-03 10:53:57 +00:00
Version: 1.9.6
Release: 1
2012-02-01 14:16:09 +04:00
License: Public Domain
Group: System/Libraries
2025-02-03 10:53:57 +00:00
URL: https://github.com/open-source-parsers/jsoncpp
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
2012-02-01 14:16:09 +04:00
%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.
2014-06-10 02:37:11 +11:00
#----------------------------------------------------------------------------
2012-02-01 14:16:09 +04:00
2014-06-10 02:37:11 +11:00
%package -n %{libname}
2012-02-01 14:16:09 +04:00
Summary: JsonCpp library
Group: System/Libraries
2014-06-10 02:37:11 +11:00
%description -n %{libname}
JsonCpp is a simple API to manipulate JSON value, handle serialization
2012-02-01 14:16:09 +04:00
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.
2014-06-10 02:37:11 +11:00
%files -n %{libname}
%doc README.md
%{_libdir}/lib%{name}.so.%{major}
%{_libdir}/lib%{name}.so.%{version}
2014-06-10 02:37:11 +11:00
#----------------------------------------------------------------------------
%package -n %{devname}
2012-02-01 14:16:09 +04:00
Summary: Development files for %{name}
Group: System/Libraries
Requires: %{libname} = %{EVRD}
2014-06-10 02:37:11 +11:00
Provides: %{name}-devel = %{EVRD}
2012-02-01 14:16:09 +04:00
2014-06-10 02:37:11 +11:00
%description -n %{devname}
2012-02-01 14:16:09 +04:00
Files for building applications with %{name} support.
2014-06-10 02:37:11 +11:00
%files -n %{devname}
%{_libdir}/lib%{name}.so
%dir %{_includedir}/json
%{_includedir}/json/*.h
%dir %{_libdir}/cmake/jsoncpp/
%{_libdir}/cmake/jsoncpp/*
%{_libdir}/pkgconfig/jsoncpp.pc
2014-06-10 02:37:11 +11:00
#----------------------------------------------------------------------------
%prep
%setup -q
2012-02-01 14:16:09 +04:00
%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
2012-02-01 14:16:09 +04:00
%install
%makeinstall_std -C build