]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # gtk-doc API documentation | |
4 | %bcond_without cairo # Cairo backend | |
5 | %bcond_without qt5 # Qt 5 wrapper | |
6 | %bcond_with qt6 # Qt 6 wrapper | |
7 | %bcond_without cpp # C++ wrapper | |
8 | %bcond_without glib # GLib wrapper | |
9 | %bcond_without static_libs # don't build static libraries | |
10 | ||
11 | %define cairo_ver 1.10.0 | |
12 | %define qt5_ver 5.9.0 | |
13 | %define qt6_ver 6.0.0 | |
14 | Summary: PDF rendering library | |
15 | Summary(pl.UTF-8): Biblioteka renderująca PDF | |
16 | Name: poppler | |
17 | Version: 21.06.1 | |
18 | Release: 1 | |
19 | License: GPL v2+ | |
20 | Group: Libraries | |
21 | Source0: https://poppler.freedesktop.org/%{name}-%{version}.tar.xz | |
22 | # Source0-md5: dbad7032b680720ea6d570fd608b849e | |
23 | Patch0: %{name}-gtkdocdir.patch | |
24 | Patch1: %{name}-include.patch | |
25 | URL: https://poppler.freedesktop.org/ | |
26 | %{?with_qt5:BuildRequires: Qt5Core-devel >= %{qt5_ver}} | |
27 | %{?with_qt5:BuildRequires: Qt5Gui-devel >= %{qt5_ver}} | |
28 | %{?with_qt5:BuildRequires: Qt5Test-devel >= %{qt5_ver}} | |
29 | %{?with_qt5:BuildRequires: Qt5Widgets-devel >= %{qt5_ver}} | |
30 | %{?with_qt5:BuildRequires: Qt5Xml-devel >= %{qt5_ver}} | |
31 | %{?with_qt6:BuildRequires: Qt6Core-devel >= %{qt6_ver}} | |
32 | %{?with_qt6:BuildRequires: Qt6Gui-devel >= %{qt6_ver}} | |
33 | %{?with_qt6:BuildRequires: Qt6Test-devel >= %{qt6_ver}} | |
34 | %{?with_qt6:BuildRequires: Qt6Widgets-devel >= %{qt6_ver}} | |
35 | BuildRequires: boost-devel >= 1.58.0 | |
36 | %{?with_cairo:BuildRequires: cairo-devel >= %{cairo_ver}} | |
37 | BuildRequires: cmake >= 3.10.0 | |
38 | BuildRequires: curl-devel | |
39 | BuildRequires: docbook-dtd412-xml | |
40 | BuildRequires: fontconfig-devel >= 2.0.0 | |
41 | BuildRequires: freetype-devel >= 2.0 | |
42 | BuildRequires: gettext-tools | |
43 | %{?with_glib:BuildRequires: glib2-devel >= 1:2.56} | |
44 | %{?with_glib:BuildRequires: gobject-introspection-devel >= 0.9.12} | |
45 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.14} | |
46 | BuildRequires: lcms2-devel >= 2 | |
47 | BuildRequires: libjpeg-devel | |
48 | BuildRequires: libpng-devel | |
49 | # -std=c++14 | |
50 | BuildRequires: libstdc++-devel >= 6:5.0 | |
51 | BuildRequires: libtiff-devel | |
52 | BuildRequires: libxml2-devel >= 2.0 | |
53 | BuildRequires: nss-devel >= 3.19 | |
54 | BuildRequires: openjpeg2-devel >= 2 | |
55 | BuildRequires: pkgconfig >= 1:0.18 | |
56 | # wanted cairo backends | |
57 | BuildRequires: pkgconfig(cairo-pdf) >= %{cairo_ver} | |
58 | BuildRequires: pkgconfig(cairo-ps) >= %{cairo_ver} | |
59 | BuildRequires: pkgconfig(cairo-svg) >= %{cairo_ver} | |
60 | %{?with_qt5:BuildRequires: qt5-build >= %{qt5_ver}} | |
61 | %{?with_qt6:BuildRequires: qt6-build >= %{qt6_ver}} | |
62 | BuildRequires: rpm-build >= 4.6 | |
63 | BuildRequires: rpmbuild(macros) >= 1.752 | |
64 | BuildRequires: sed >= 4.0 | |
65 | BuildRequires: tar >= 1:1.22 | |
66 | BuildRequires: which | |
67 | BuildRequires: xz | |
68 | BuildRequires: zlib-devel | |
69 | Requires: openjpeg2 >= 2 | |
70 | Obsoletes: poppler-qt4-static | |
71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
72 | ||
73 | %description | |
74 | A common PDF rendering library for integrating PDF viewing into | |
75 | desktop applications (based on the xpdf-3.0 code base). | |
76 | ||
77 | %description -l pl.UTF-8 | |
78 | Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w | |
79 | aplikacjach desktopowych (oparta na kodzie xpdf-3.0). | |
80 | ||
81 | %package devel | |
82 | Summary: Poppler header files | |
83 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler | |
84 | Group: Development/Libraries | |
85 | Requires: %{name} = %{version}-%{release} | |
86 | Requires: curl-devel | |
87 | Requires: lcms2-devel >= 2 | |
88 | Requires: libstdc++-devel >= 6:5.0 | |
89 | Requires: nss-devel >= 3.19 | |
90 | Conflicts: poppler0.61-devel | |
91 | ||
92 | %description devel | |
93 | Header files for the Poppler library. | |
94 | ||
95 | %description devel -l pl.UTF-8 | |
96 | Pliki nagłówkowe biblioteki Poppler. | |
97 | ||
98 | %package static | |
99 | Summary: Poppler static libraries | |
100 | Summary(pl.UTF-8): Statyczne biblioteki Poppler | |
101 | Group: Development/Libraries | |
102 | Requires: %{name}-devel = %{version}-%{release} | |
103 | ||
104 | %description static | |
105 | Poppler static libraries. | |
106 | ||
107 | %description static -l pl.UTF-8 | |
108 | Statyczne biblioteki Poppler. | |
109 | ||
110 | %package apidocs | |
111 | Summary: Poppler library API documentation | |
112 | Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler | |
113 | Group: Documentation | |
114 | Requires: gtk-doc-common | |
115 | BuildArch: noarch | |
116 | ||
117 | %description apidocs | |
118 | Poppler library API documentation. | |
119 | ||
120 | %description apidocs -l pl.UTF-8 | |
121 | Dokumentacja API biblioteki Poppler. | |
122 | ||
123 | %package cpp | |
124 | Summary: Cpp wrapper for poppler | |
125 | Summary(pl.UTF-8): Wrapper cpp dla popplera | |
126 | Group: Libraries | |
127 | Requires: %{name} = %{version}-%{release} | |
128 | ||
129 | %description cpp | |
130 | Cpp wrapper for poppler. | |
131 | ||
132 | %description cpp -l pl.UTF-8 | |
133 | Wrapper cpp dla popplera. | |
134 | ||
135 | %package cpp-devel | |
136 | Summary: Header files for cpp wrapper for poppler | |
137 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera cpp dla popplera | |
138 | Group: Development/Libraries | |
139 | Requires: %{name}-cpp = %{version}-%{release} | |
140 | Requires: %{name}-devel = %{version}-%{release} | |
141 | ||
142 | %description cpp-devel | |
143 | Header files for cpp wrapper for poppler. | |
144 | ||
145 | %description cpp-devel -l pl.UTF-8 | |
146 | Pliki nagłówkowe wrappera cpp dla popplera. | |
147 | ||
148 | %package cpp-static | |
149 | Summary: Static version of cpp wrapper for poppler | |
150 | Summary(pl.UTF-8): Statyczna wersja wrappera cpp dla popplera | |
151 | Group: Development/Libraries | |
152 | Requires: %{name}-cpp-devel = %{version}-%{release} | |
153 | ||
154 | %description cpp-static | |
155 | Static version of cpp wrapper for poppler. | |
156 | ||
157 | %description cpp-static -l pl.UTF-8 | |
158 | Statyczna wersja wrappera cpp dla popplera. | |
159 | ||
160 | %package glib | |
161 | Summary: GLib wrapper for poppler | |
162 | Summary(pl.UTF-8): Wrapper GLib dla popplera | |
163 | Group: Libraries | |
164 | Requires: %{name} = %{version}-%{release} | |
165 | %{?with_cairo:Requires: cairo >= %{cairo_ver}} | |
166 | Requires: glib2 >= 1:2.56 | |
167 | ||
168 | %description glib | |
169 | GLib wrapper for poppler. | |
170 | ||
171 | %description glib -l pl.UTF-8 | |
172 | Wrapper GLib dla popplera. | |
173 | ||
174 | %package glib-devel | |
175 | Summary: Header files for GLib wrapper for poppler | |
176 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera GLib dla popplera | |
177 | Group: Development/Libraries | |
178 | Requires: %{name}-devel = %{version}-%{release} | |
179 | Requires: %{name}-glib = %{version}-%{release} | |
180 | %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}} | |
181 | Requires: glib2-devel >= 1:2.56 | |
182 | ||
183 | %description glib-devel | |
184 | Header files for GLib wrapper for poppler. | |
185 | ||
186 | %description glib-devel -l pl.UTF-8 | |
187 | Pliki nagłówkowe wrappera GLib dla popplera. | |
188 | ||
189 | %package glib-static | |
190 | Summary: Static version of GLib wrapper for poppler | |
191 | Summary(pl.UTF-8): Statyczna wersja wrappera GLib dla popplera | |
192 | Group: Development/Libraries | |
193 | Requires: %{name}-glib-devel = %{version}-%{release} | |
194 | ||
195 | %description glib-static | |
196 | Static version of GLib wrapper for poppler. | |
197 | ||
198 | %description glib-static -l pl.UTF-8 | |
199 | Statyczna wersja wrappera GLib dla popplera. | |
200 | ||
201 | %package qt5 | |
202 | Summary: Qt5 wrapper for poppler | |
203 | Summary(pl.UTF-8): Wrapper Qt5 dla popplera | |
204 | Group: Libraries | |
205 | Requires: %{name} = %{version}-%{release} | |
206 | ||
207 | %description qt5 | |
208 | Qt5 wrapper for poppler. | |
209 | ||
210 | %description qt5 -l pl.UTF-8 | |
211 | Wrapper Qt5 dla popplera. | |
212 | ||
213 | %package qt5-devel | |
214 | Summary: Header files for Qt5 wrapper for poppler | |
215 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt5 dla popplera | |
216 | Group: Development/Libraries | |
217 | Requires: %{name}-devel = %{version}-%{release} | |
218 | Requires: %{name}-qt5 = %{version}-%{release} | |
219 | Requires: Qt5Core-devel >= %{qt5_ver} | |
220 | Requires: Qt5Gui-devel >= %{qt5_ver} | |
221 | Requires: Qt5Widgets-devel >= %{qt5_ver} | |
222 | Requires: Qt5Xml-devel >= %{qt5_ver} | |
223 | ||
224 | %description qt5-devel | |
225 | Header files for Qt5 wrapper for poppler. | |
226 | ||
227 | %description qt5-devel -l pl.UTF-8 | |
228 | Pliki nagłówkowe wrapper Qt5 dla popplera. | |
229 | ||
230 | %package qt5-static | |
231 | Summary: Static version of Qt5 wrapper for poppler | |
232 | Summary(pl.UTF-8): Statyczna wersja wrappera Qt5 dla popplera | |
233 | Group: Development/Libraries | |
234 | Requires: %{name}-qt5-devel = %{version}-%{release} | |
235 | ||
236 | %description qt5-static | |
237 | Static version of Qt5 wrapper for poppler. | |
238 | ||
239 | %description qt5-static -l pl.UTF-8 | |
240 | Statyczna wersja wrappera Qt5 dla popplera. | |
241 | ||
242 | %package progs | |
243 | Summary: Set of tools for viewing information and converting PDF files | |
244 | Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF | |
245 | Group: Applications/Publishing | |
246 | Provides: pdftops | |
247 | Obsoletes: pdftohtml | |
248 | Obsoletes: pdftohtml-pdftops | |
249 | Obsoletes: poppler-utils | |
250 | Obsoletes: xpdf-tools | |
251 | ||
252 | %description progs | |
253 | Package contains utilites for PDF files. These utilities allow to | |
254 | - extract information about PDF files, | |
255 | - extract images from PDF files, | |
256 | - convert PDF files to HTML, plain text and PS formats. | |
257 | ||
258 | %description progs -l pl.UTF-8 | |
259 | Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają | |
260 | - wyświetlanie informacji o plikach PDF, | |
261 | - wydobywanie obrazków z plików PDF, | |
262 | - konwersję plików PDF do formatów takich jak HTML, PS czy też | |
263 | czystego tekstu. | |
264 | ||
265 | %prep | |
266 | %setup -q | |
267 | %patch0 -p1 | |
268 | %patch1 -p1 | |
269 | ||
270 | %build | |
271 | install -d build | |
272 | cd build | |
273 | %cmake .. \ | |
274 | %{!?with_cpp:-DENABLE_CPP=OFF} \ | |
275 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
276 | %{?with_apidocs:-DENABLE_GTK_DOC=ON} \ | |
277 | -DENABLE_GTK_TESTS=OFF \ | |
278 | -DENABLE_LIBCURL=ON \ | |
279 | %{!?with_qt5:-DENABLE_QT5=OFF} \ | |
280 | %{!?with_qt6:-DENABLE_QT6=OFF} \ | |
281 | -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ | |
282 | -DENABLE_ZLIB=ON \ | |
283 | %{!?with_cairo:-DWITH_CAIRO=OFF} | |
284 | ||
285 | %{__make} | |
286 | cd .. | |
287 | ||
288 | %if %{with static_libs} | |
289 | install -d build-static | |
290 | cd build-static | |
291 | %cmake .. \ | |
292 | -DBUILD_SHARED_LIBS=OFF \ | |
293 | %{!?with_cpp:-DENABLE_CPP=OFF} \ | |
294 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
295 | -DENABLE_GTK_DOC=OFF \ | |
296 | -DENABLE_GTK_TESTS=OFF \ | |
297 | -DENABLE_LIBCURL=ON \ | |
298 | %{!?with_qt5:-DENABLE_QT5=OFF} \ | |
299 | -DENABLE_ZLIB=ON \ | |
300 | %{!?with_cairo:-DWITH_CAIRO=OFF} | |
301 | ||
302 | %{__make} | |
303 | %endif | |
304 | ||
305 | %install | |
306 | rm -rf $RPM_BUILD_ROOT | |
307 | ||
308 | %if %{with static_libs} | |
309 | %{__make} -C build-static install \ | |
310 | DESTDIR=$RPM_BUILD_ROOT | |
311 | %endif | |
312 | ||
313 | %{__make} -C build install \ | |
314 | DESTDIR=$RPM_BUILD_ROOT | |
315 | ||
316 | %clean | |
317 | rm -rf $RPM_BUILD_ROOT | |
318 | ||
319 | %post -p /sbin/ldconfig | |
320 | %postun -p /sbin/ldconfig | |
321 | ||
322 | %post cpp -p /sbin/ldconfig | |
323 | %postun cpp -p /sbin/ldconfig | |
324 | ||
325 | %post glib -p /sbin/ldconfig | |
326 | %postun glib -p /sbin/ldconfig | |
327 | ||
328 | %post qt5 -p /sbin/ldconfig | |
329 | %postun qt5 -p /sbin/ldconfig | |
330 | ||
331 | %files | |
332 | %defattr(644,root,root,755) | |
333 | %doc AUTHORS ChangeLog NEWS README* | |
334 | %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.* | |
335 | %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.111 | |
336 | ||
337 | %files devel | |
338 | %defattr(644,root,root,755) | |
339 | %attr(755,root,root) %{_libdir}/libpoppler.so | |
340 | %dir %{_includedir}/poppler | |
341 | %{_includedir}/poppler/poppler-config.h | |
342 | %{_includedir}/poppler/poppler_private_export.h | |
343 | %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h | |
344 | %{_includedir}/poppler/fofi | |
345 | %{_includedir}/poppler/goo | |
346 | %{_includedir}/poppler/splash | |
347 | %{_pkgconfigdir}/poppler.pc | |
348 | ||
349 | %if %{with static_libs} | |
350 | %files static | |
351 | %defattr(644,root,root,755) | |
352 | %{_libdir}/libpoppler.a | |
353 | %endif | |
354 | ||
355 | %if %{with apidocs} | |
356 | %files apidocs | |
357 | %defattr(644,root,root,755) | |
358 | %{_gtkdocdir}/poppler | |
359 | %endif | |
360 | ||
361 | %if %{with cpp} | |
362 | %files cpp | |
363 | %defattr(644,root,root,755) | |
364 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.* | |
365 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0 | |
366 | ||
367 | %files cpp-devel | |
368 | %defattr(644,root,root,755) | |
369 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so | |
370 | %{_includedir}/poppler/cpp | |
371 | %{_pkgconfigdir}/poppler-cpp.pc | |
372 | ||
373 | %if %{with static_libs} | |
374 | %files cpp-static | |
375 | %defattr(644,root,root,755) | |
376 | %{_libdir}/libpoppler-cpp.a | |
377 | %endif | |
378 | %endif | |
379 | ||
380 | %if %{with glib} | |
381 | %files glib | |
382 | %defattr(644,root,root,755) | |
383 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.* | |
384 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8 | |
385 | %{_libdir}/girepository-1.0/Poppler-0.18.typelib | |
386 | ||
387 | %files glib-devel | |
388 | %defattr(644,root,root,755) | |
389 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so | |
390 | %{_includedir}/poppler/glib | |
391 | %{_pkgconfigdir}/poppler-glib.pc | |
392 | %{_datadir}/gir-1.0/Poppler-0.18.gir | |
393 | ||
394 | %if %{with static_libs} | |
395 | %files glib-static | |
396 | %defattr(644,root,root,755) | |
397 | %{_libdir}/libpoppler-glib.a | |
398 | %endif | |
399 | %endif | |
400 | ||
401 | %if %{with qt5} | |
402 | %files qt5 | |
403 | %defattr(644,root,root,755) | |
404 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.* | |
405 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1 | |
406 | ||
407 | %files qt5-devel | |
408 | %defattr(644,root,root,755) | |
409 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so | |
410 | %{_includedir}/poppler/qt5 | |
411 | %{_pkgconfigdir}/poppler-qt5.pc | |
412 | ||
413 | %if %{with static_libs} | |
414 | %files qt5-static | |
415 | %defattr(644,root,root,755) | |
416 | %{_libdir}/libpoppler-qt5.a | |
417 | %endif | |
418 | %endif | |
419 | ||
420 | %files progs | |
421 | %defattr(644,root,root,755) | |
422 | %attr(755,root,root) %{_bindir}/pdfattach | |
423 | %attr(755,root,root) %{_bindir}/pdfdetach | |
424 | %attr(755,root,root) %{_bindir}/pdffonts | |
425 | %attr(755,root,root) %{_bindir}/pdfimages | |
426 | %attr(755,root,root) %{_bindir}/pdfinfo | |
427 | %attr(755,root,root) %{_bindir}/pdfseparate | |
428 | %attr(755,root,root) %{_bindir}/pdfsig | |
429 | %attr(755,root,root) %{_bindir}/pdftocairo | |
430 | %attr(755,root,root) %{_bindir}/pdftohtml | |
431 | %attr(755,root,root) %{_bindir}/pdftoppm | |
432 | %attr(755,root,root) %{_bindir}/pdftops | |
433 | %attr(755,root,root) %{_bindir}/pdftotext | |
434 | %attr(755,root,root) %{_bindir}/pdfunite | |
435 | %{_mandir}/man1/pdfattach.1* | |
436 | %{_mandir}/man1/pdfdetach.1* | |
437 | %{_mandir}/man1/pdffonts.1* | |
438 | %{_mandir}/man1/pdfimages.1* | |
439 | %{_mandir}/man1/pdfinfo.1* | |
440 | %{_mandir}/man1/pdfseparate.1* | |
441 | %{_mandir}/man1/pdfsig.1* | |
442 | %{_mandir}/man1/pdftocairo.1* | |
443 | %{_mandir}/man1/pdftohtml.1* | |
444 | %{_mandir}/man1/pdftoppm.1* | |
445 | %{_mandir}/man1/pdftops.1* | |
446 | %{_mandir}/man1/pdftotext.1* | |
447 | %{_mandir}/man1/pdfunite.1* |