3 %bcond_without apidocs # doxygen apidocs build
4 %bcond_without tests # tests during build
6 Summary: API for manipulating JSON
7 Summary(pl.UTF-8): API do operacji na strukturach JSON
11 License: MIT or Public Domain
13 Source0: https://github.com/open-source-parsers/jsoncpp/archive/%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: 4c886ac3bfccc867a79f3a5280ce1152
15 Patch0: %{name}-test.patch
16 Patch1: %{name}-libdir.patch
17 URL: https://github.com/open-source-parsers/jsoncpp/
18 BuildRequires: cmake >= 2.8.5
19 BuildRequires: libstdc++-devel
20 BuildRequires: python >= 2
22 BuildRequires: doxygen
23 BuildRequires: graphviz
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 JSONCPP provides a simple API to manipulate JSON values, and handle
29 serialization and unserialization to strings.
32 JSONCPP udostępnia proste API do operacji na wartościach JSON oraz
33 obsługi serializacji oraz deserializacji z łańcuchów znaków.
36 Summary: Header files for JSONCPP library
37 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki JSONCPP
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 Header files for JSONCPP library.
44 %description devel -l pl.UTF-8
45 Pliki nagłówkowe biblioteki JSONCPP.
48 Summary: API documentation for JSONCPP library
49 Summary(pl.UTF-8): Dokumentacja API biblioteki JSONCPP
53 API documentation for JSONCPP library.
55 %description apidocs -l pl.UTF-8
56 Dokumentacja API biblioteki JSONCPP.
67 -DARCHIVE_INSTALL_DIR:PATH=%{_lib} \
68 -DLIBRARY_INSTALL_DIR:PATH=%{_lib} \
69 -DPACKAGE_INSTALL_DIR:PATH=%{_lib}/cmake \
70 -DJSONCPP_LIB_BUILD_SHARED=ON \
71 -DJSONCPP_WITH_CMAKE_PACKAGE=ON \
72 %{!?with_tests:-DJSONCPP_WITH_TESTS=OFF}
76 %{__python} doxybuild.py \
78 --doxygen=/usr/bin/doxygen
82 rm -rf $RPM_BUILD_ROOT
84 %{__make} -C build install \
85 DESTDIR=$RPM_BUILD_ROOT
87 # <json/*> is too common, use <jsoncpp/*>
88 %{__mv} $RPM_BUILD_ROOT%{_includedir}/{json,jsoncpp}
91 rm -rf $RPM_BUILD_ROOT
93 %post -p /sbin/ldconfig
94 %postun -p /sbin/ldconfig
97 %defattr(644,root,root,755)
98 %doc AUTHORS LICENSE NEWS.txt README.md
99 %attr(755,root,root) %{_libdir}/libjsoncpp.so.*.*.*
100 %attr(755,root,root) %ghost %{_libdir}/libjsoncpp.so.1
103 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_libdir}/libjsoncpp.so
105 %{_includedir}/jsoncpp
106 %{_pkgconfigdir}/jsoncpp.pc
107 %{_libdir}/cmake/jsoncpp
111 %defattr(644,root,root,755)
112 %doc dist/doxygen/jsoncpp-api-html-*/*