]> git.pld-linux.org Git - packages/jsoncpp.git/blame - jsoncpp.spec
noarch apidoc
[packages/jsoncpp.git] / jsoncpp.spec
CommitLineData
0cc95b9e
ER
1#
2# Conditional build:
68cefeae 3%bcond_without apidocs # doxygen apidocs build
1fe9b66c 4%bcond_without tests # tests during build
0cc95b9e 5
0cc95b9e 6Summary: API for manipulating JSON
68cefeae 7Summary(pl.UTF-8): API do operacji na strukturach JSON
0cc95b9e 8Name: jsoncpp
6b377cf3 9Version: 1.6.2
582df215 10Release: 4
0cc95b9e
ER
11License: MIT or Public Domain
12Group: Libraries
1fe9b66c 13Source0: https://github.com/open-source-parsers/jsoncpp/archive/%{version}/%{name}-%{version}.tar.gz
6b377cf3 14# Source0-md5: 5a62da8b5c5b0e46a0e782e7363aee3d
1fe9b66c
JB
15URL: https://github.com/open-source-parsers/jsoncpp/
16BuildRequires: cmake >= 2.8.5
68cefeae
JB
17BuildRequires: libstdc++-devel
18BuildRequires: python >= 2
68cefeae
JB
19%if %{with apidocs}
20BuildRequires: doxygen
21BuildRequires: graphviz
22%endif
0cc95b9e
ER
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26JSONCPP provides a simple API to manipulate JSON values, and handle
27serialization and unserialization to strings.
28
68cefeae
JB
29%description
30JSONCPP udostępnia proste API do operacji na wartościach JSON oraz
31obsługi serializacji oraz deserializacji z łańcuchów znaków.
32
0cc95b9e 33%package devel
68cefeae
JB
34Summary: Header files for JSONCPP library
35Summary(pl.UTF-8): Pliki nagłówkowe biblioteki JSONCPP
c4ee6642 36Group: Development/Libraries
0cc95b9e
ER
37Requires: %{name} = %{version}-%{release}
38
39%description devel
68cefeae
JB
40Header files for JSONCPP library.
41
42%description devel -l pl.UTF-8
43Pliki nagłówkowe biblioteki JSONCPP.
44
2bb69255
JB
45%package static
46Summary: Static JSONCPP library
47Summary(pl.UTF-8): Statyczna biblioteka JSONCPP
48Group: Development/Libraries
49Requires: %{name}-devel = %{version}-%{release}
50
51%description static
52Static JSONCPP library.
53
54%description static -l pl.UTF-8
55Statyczna biblioteka JSONCPP.
56
68cefeae
JB
57%package apidocs
58Summary: API documentation for JSONCPP library
59Summary(pl.UTF-8): Dokumentacja API biblioteki JSONCPP
60Group: Documentation
582df215
ER
61%if "%{_rpmversion}" >= "5"
62BuildArch: noarch
63%endif
68cefeae
JB
64
65%description apidocs
66API documentation for JSONCPP library.
67
68%description apidocs -l pl.UTF-8
69Dokumentacja API biblioteki JSONCPP.
0cc95b9e
ER
70
71%prep
1fe9b66c 72%setup -q
0cc95b9e
ER
73
74%build
1fe9b66c
JB
75install -d build
76cd build
77%cmake .. \
f14332c8 78 -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/%{name} \
1fe9b66c
JB
79 -DARCHIVE_INSTALL_DIR:PATH=%{_lib} \
80 -DLIBRARY_INSTALL_DIR:PATH=%{_lib} \
81 -DPACKAGE_INSTALL_DIR:PATH=%{_lib}/cmake \
82 -DJSONCPP_LIB_BUILD_SHARED=ON \
83 -DJSONCPP_WITH_CMAKE_PACKAGE=ON \
84 %{!?with_tests:-DJSONCPP_WITH_TESTS=OFF}
85cd ..
0cc95b9e 86
68cefeae
JB
87%if %{with apidocs}
88%{__python} doxybuild.py \
89 --dot=/usr/bin/dot \
90 --doxygen=/usr/bin/doxygen
91%endif
92
0cc95b9e
ER
93%install
94rm -rf $RPM_BUILD_ROOT
0cc95b9e 95
1fe9b66c
JB
96%{__make} -C build install \
97 DESTDIR=$RPM_BUILD_ROOT
98
0cc95b9e
ER
99%clean
100rm -rf $RPM_BUILD_ROOT
101
68cefeae
JB
102%post -p /sbin/ldconfig
103%postun -p /sbin/ldconfig
0cc95b9e
ER
104
105%files
106%defattr(644,root,root,755)
1fe9b66c
JB
107%doc AUTHORS LICENSE NEWS.txt README.md
108%attr(755,root,root) %{_libdir}/libjsoncpp.so.*.*.*
109%attr(755,root,root) %ghost %{_libdir}/libjsoncpp.so.1
0cc95b9e
ER
110
111%files devel
112%defattr(644,root,root,755)
68cefeae 113%attr(755,root,root) %{_libdir}/libjsoncpp.so
0cc95b9e 114%{_includedir}/jsoncpp
0cc95b9e 115%{_pkgconfigdir}/jsoncpp.pc
1fe9b66c 116%{_libdir}/cmake/jsoncpp
68cefeae 117
2bb69255
JB
118%files static
119%defattr(644,root,root,755)
120%{_libdir}/libjsoncpp.a
121
68cefeae
JB
122%if %{with apidocs}
123%files apidocs
124%defattr(644,root,root,755)
125%doc dist/doxygen/jsoncpp-api-html-*/*
126%endif
This page took 0.141559 seconds and 4 git commands to generate.