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