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