]>
Commit | Line | Data |
---|---|---|
388247c2 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4 | %bcond_without static_libs # don't build static libraries | |
3c9a0168 | 5 | |
388247c2 | 6 | Summary: C library for encoding, decoding and manipulating JSON data |
1e961dcb | 7 | Summary(pl.UTF-8): Biblioteka C do kodowania, dekodowania i obróbki danych JSON |
388247c2 | 8 | Name: jansson |
391c5435 | 9 | Version: 2.13.1 |
589b3225 | 10 | Release: 1 |
388247c2 JK |
11 | License: MIT |
12 | Group: Libraries | |
47e689aa | 13 | Source0: http://digip.org/jansson/releases/%{name}-%{version}.tar.bz2 |
391c5435 | 14 | # Source0-md5: e343e5b2e8fac568a00a8ca36dc01ebe |
47e689aa | 15 | URL: http://digip.org/jansson/ |
52e299a7 JB |
16 | BuildRequires: autoconf >= 2.60 |
17 | BuildRequires: automake >= 1:1.10 | |
388247c2 | 18 | BuildRequires: libtool |
391c5435 | 19 | BuildRequires: rpmbuild(macros) >= 1.752 |
52e299a7 | 20 | %{?with_apidocs:BuildRequires: sphinx-pdg} |
388247c2 JK |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
24 | Jansson is a C library for encoding, decoding and manipulating JSON | |
25 | data. It features: | |
388247c2 JK |
26 | - Simple and intuitive API and data model |
27 | - Comprehensive documentation | |
28 | - No dependencies on other libraries | |
29 | - Full Unicode support (UTF-8) | |
30 | - Extensive test suite | |
31 | ||
1e961dcb JB |
32 | %description -l pl.UTF-8 |
33 | Jansson to biblioteka C do kodowania, dekodowania oraz obróbki danych | |
34 | JSON. Cechują ją: | |
35 | - proste i intuicyjne API oraz model danych | |
36 | - wyczerpująca dokumentacja | |
37 | - brak zależności od innych bibliotek | |
38 | - pełna obsługa Unicode (UTF-8) | |
39 | - obszerny zestaw testów | |
40 | ||
388247c2 JK |
41 | %package devel |
42 | Summary: Header files for %{name} library | |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | ||
47 | %description devel | |
48 | Header files for %{name} library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki %{name}. | |
52 | ||
53 | %package static | |
54 | Summary: Static %{name} library | |
55 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
56 | Group: Development/Libraries | |
57 | Requires: %{name}-devel = %{version}-%{release} | |
58 | ||
59 | %description static | |
60 | Static %{name} library. | |
61 | ||
62 | %description static -l pl.UTF-8 | |
63 | Statyczna biblioteka %{name}. | |
64 | ||
65 | %package apidocs | |
66 | Summary: %{name} API documentation | |
67 | Summary(pl.UTF-8): Dokumentacja API biblioteki %{name} | |
68 | Group: Documentation | |
f8936d99 | 69 | BuildArch: noarch |
388247c2 JK |
70 | |
71 | %description apidocs | |
1e961dcb | 72 | API documentation for %{name} library. |
388247c2 JK |
73 | |
74 | %description apidocs -l pl.UTF-8 | |
75 | Dokumentacja API biblioteki %{name}. | |
76 | ||
77 | %prep | |
78 | %setup -q | |
79 | ||
80 | %build | |
81 | %{__libtoolize} | |
82 | %{__aclocal} | |
83 | %{__autoconf} | |
84 | %{__autoheader} | |
85 | %{__automake} | |
86 | %configure \ | |
87 | %{!?with_static_libs:--disable-static} | |
88 | %{__make} | |
89 | ||
90 | %if %{with apidocs} | |
91 | %{__make} -C doc html | |
92 | %endif | |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %{__make} install \ | |
98 | DESTDIR=$RPM_BUILD_ROOT | |
99 | ||
1e961dcb | 100 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libjansson.la |
388247c2 JK |
101 | |
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %post -p /sbin/ldconfig | |
106 | %postun -p /sbin/ldconfig | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
52e299a7 | 110 | %doc CHANGES LICENSE README.rst |
1e961dcb JB |
111 | %attr(755,root,root) %{_libdir}/libjansson.so.*.*.* |
112 | %attr(755,root,root) %ghost %{_libdir}/libjansson.so.4 | |
388247c2 JK |
113 | |
114 | %files devel | |
115 | %defattr(644,root,root,755) | |
1e961dcb JB |
116 | %attr(755,root,root) %{_libdir}/libjansson.so |
117 | %{_includedir}/jansson*.h | |
118 | %{_pkgconfigdir}/jansson.pc | |
388247c2 JK |
119 | |
120 | %if %{with static_libs} | |
121 | %files static | |
122 | %defattr(644,root,root,755) | |
1e961dcb | 123 | %{_libdir}/libjansson.a |
388247c2 JK |
124 | %endif |
125 | ||
126 | %if %{with apidocs} | |
127 | %files apidocs | |
128 | %defattr(644,root,root,755) | |
129 | %doc doc/_build/html | |
130 | %endif |