]> git.pld-linux.org Git - packages/jsoncpp.git/blame - jsoncpp.spec
- release 2 (by relup.sh)
[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
1fe9b66c 9Version: 1.0.0
49e003df 10Release: 2
0cc95b9e
ER
11License: MIT or Public Domain
12Group: Libraries
1fe9b66c
JB
13Source0: https://github.com/open-source-parsers/jsoncpp/archive/%{version}/%{name}-%{version}.tar.gz
14# Source0-md5: 4c886ac3bfccc867a79f3a5280ce1152
15Patch0: %{name}-test.patch
16Patch1: %{name}-libdir.patch
17URL: https://github.com/open-source-parsers/jsoncpp/
18BuildRequires: cmake >= 2.8.5
68cefeae
JB
19BuildRequires: libstdc++-devel
20BuildRequires: python >= 2
68cefeae
JB
21%if %{with apidocs}
22BuildRequires: doxygen
23BuildRequires: graphviz
24%endif
0cc95b9e
ER
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28JSONCPP provides a simple API to manipulate JSON values, and handle
29serialization and unserialization to strings.
30
68cefeae
JB
31%description
32JSONCPP udostępnia proste API do operacji na wartościach JSON oraz
33obsługi serializacji oraz deserializacji z łańcuchów znaków.
34
0cc95b9e 35%package devel
68cefeae
JB
36Summary: Header files for JSONCPP library
37Summary(pl.UTF-8): Pliki nagłówkowe biblioteki JSONCPP
c4ee6642 38Group: Development/Libraries
0cc95b9e
ER
39Requires: %{name} = %{version}-%{release}
40
41%description devel
68cefeae
JB
42Header files for JSONCPP library.
43
44%description devel -l pl.UTF-8
45Pliki nagłówkowe biblioteki JSONCPP.
46
47%package apidocs
48Summary: API documentation for JSONCPP library
49Summary(pl.UTF-8): Dokumentacja API biblioteki JSONCPP
50Group: Documentation
51
52%description apidocs
53API documentation for JSONCPP library.
54
55%description apidocs -l pl.UTF-8
56Dokumentacja API biblioteki JSONCPP.
0cc95b9e
ER
57
58%prep
1fe9b66c 59%setup -q
0cc95b9e 60%patch0 -p1
1fe9b66c 61%patch1 -p1
0cc95b9e
ER
62
63%build
1fe9b66c
JB
64install -d build
65cd build
66%cmake .. \
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}
73cd ..
0cc95b9e 74
68cefeae
JB
75%if %{with apidocs}
76%{__python} doxybuild.py \
77 --dot=/usr/bin/dot \
78 --doxygen=/usr/bin/doxygen
79%endif
80
0cc95b9e
ER
81%install
82rm -rf $RPM_BUILD_ROOT
0cc95b9e 83
1fe9b66c
JB
84%{__make} -C build install \
85 DESTDIR=$RPM_BUILD_ROOT
86
87# <json/*> is too common, use <jsoncpp/*>
88%{__mv} $RPM_BUILD_ROOT%{_includedir}/{json,jsoncpp}
0cc95b9e
ER
89
90%clean
91rm -rf $RPM_BUILD_ROOT
92
68cefeae
JB
93%post -p /sbin/ldconfig
94%postun -p /sbin/ldconfig
0cc95b9e
ER
95
96%files
97%defattr(644,root,root,755)
1fe9b66c
JB
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
0cc95b9e
ER
101
102%files devel
103%defattr(644,root,root,755)
68cefeae 104%attr(755,root,root) %{_libdir}/libjsoncpp.so
0cc95b9e 105%{_includedir}/jsoncpp
0cc95b9e 106%{_pkgconfigdir}/jsoncpp.pc
1fe9b66c 107%{_libdir}/cmake/jsoncpp
68cefeae
JB
108
109%if %{with apidocs}
110%files apidocs
111%defattr(644,root,root,755)
112%doc dist/doxygen/jsoncpp-api-html-*/*
113%endif
This page took 0.080148 seconds and 4 git commands to generate.