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