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
11 %define cairo_ver 1.10.0
14 Summary: PDF rendering library
15 Summary(pl.UTF-8): Biblioteka renderująca PDF
21 Source0: https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
22 # Source0-md5: eb4a8465b03ec58cc6a3277aa7d4fa7b
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.5.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.41}
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
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: rpmbuild(macros) >= 1.752
63 BuildRequires: sed >= 4.0
64 BuildRequires: tar >= 1:1.22
67 BuildRequires: zlib-devel
68 Requires: openjpeg2 >= 2
69 Obsoletes: poppler-qt4-static
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73 A common PDF rendering library for integrating PDF viewing into
74 desktop applications (based on the xpdf-3.0 code base).
76 %description -l pl.UTF-8
77 Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w
78 aplikacjach desktopowych (oparta na kodzie xpdf-3.0).
81 Summary: Poppler header files
82 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler
83 Group: Development/Libraries
84 Requires: %{name} = %{version}-%{release}
86 Requires: lcms2-devel >= 2
87 Requires: libstdc++-devel >= 6:5.0
88 Requires: nss-devel >= 3.19
89 Conflicts: poppler0.61-devel
92 Header files for the Poppler library.
94 %description devel -l pl.UTF-8
95 Pliki nagłówkowe biblioteki Poppler.
98 Summary: Poppler static libraries
99 Summary(pl.UTF-8): Statyczne biblioteki Poppler
100 Group: Development/Libraries
101 Requires: %{name}-devel = %{version}-%{release}
104 Poppler static libraries.
106 %description static -l pl.UTF-8
107 Statyczne biblioteki Poppler.
110 Summary: Poppler library API documentation
111 Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler
113 Requires: gtk-doc-common
117 Poppler library API documentation.
119 %description apidocs -l pl.UTF-8
120 Dokumentacja API biblioteki Poppler.
123 Summary: Cpp wrapper for poppler
124 Summary(pl.UTF-8): Wrapper cpp dla popplera
126 Requires: %{name} = %{version}-%{release}
129 Cpp wrapper for poppler.
131 %description cpp -l pl.UTF-8
132 Wrapper cpp dla popplera.
135 Summary: Header files for cpp wrapper for poppler
136 Summary(pl.UTF-8): Pliki nagłówkowe wrappera cpp dla popplera
137 Group: Development/Libraries
138 Requires: %{name}-cpp = %{version}-%{release}
139 Requires: %{name}-devel = %{version}-%{release}
141 %description cpp-devel
142 Header files for cpp wrapper for poppler.
144 %description cpp-devel -l pl.UTF-8
145 Pliki nagłówkowe wrappera cpp dla popplera.
148 Summary: Static version of cpp wrapper for poppler
149 Summary(pl.UTF-8): Statyczna wersja wrappera cpp dla popplera
150 Group: Development/Libraries
151 Requires: %{name}-cpp-devel = %{version}-%{release}
153 %description cpp-static
154 Static version of cpp wrapper for poppler.
156 %description cpp-static -l pl.UTF-8
157 Statyczna wersja wrappera cpp dla popplera.
160 Summary: GLib wrapper for poppler
161 Summary(pl.UTF-8): Wrapper GLib dla popplera
163 Requires: %{name} = %{version}-%{release}
164 %{?with_cairo:Requires: cairo >= %{cairo_ver}}
165 Requires: glib2 >= 1:2.41
168 GLib wrapper for poppler.
170 %description glib -l pl.UTF-8
171 Wrapper GLib dla popplera.
174 Summary: Header files for GLib wrapper for poppler
175 Summary(pl.UTF-8): Pliki nagłówkowe wrappera GLib dla popplera
176 Group: Development/Libraries
177 Requires: %{name}-devel = %{version}-%{release}
178 Requires: %{name}-glib = %{version}-%{release}
179 %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}}
180 Requires: glib2-devel >= 1:2.41
182 %description glib-devel
183 Header files for GLib wrapper for poppler.
185 %description glib-devel -l pl.UTF-8
186 Pliki nagłówkowe wrappera GLib dla popplera.
189 Summary: Static version of GLib wrapper for poppler
190 Summary(pl.UTF-8): Statyczna wersja wrappera GLib dla popplera
191 Group: Development/Libraries
192 Requires: %{name}-glib-devel = %{version}-%{release}
194 %description glib-static
195 Static version of GLib wrapper for poppler.
197 %description glib-static -l pl.UTF-8
198 Statyczna wersja wrappera GLib dla popplera.
201 Summary: Qt5 wrapper for poppler
202 Summary(pl.UTF-8): Wrapper Qt5 dla popplera
204 Requires: %{name} = %{version}-%{release}
207 Qt5 wrapper for poppler.
209 %description qt5 -l pl.UTF-8
210 Wrapper Qt5 dla popplera.
213 Summary: Header files for Qt5 wrapper for poppler
214 Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt5 dla popplera
215 Group: Development/Libraries
216 Requires: %{name}-devel = %{version}-%{release}
217 Requires: %{name}-qt5 = %{version}-%{release}
218 Requires: Qt5Core-devel >= %{qt5_ver}
219 Requires: Qt5Gui-devel >= %{qt5_ver}
220 Requires: Qt5Widgets-devel >= %{qt5_ver}
221 Requires: Qt5Xml-devel >= %{qt5_ver}
223 %description qt5-devel
224 Header files for Qt5 wrapper for poppler.
226 %description qt5-devel -l pl.UTF-8
227 Pliki nagłówkowe wrapper Qt5 dla popplera.
230 Summary: Static version of Qt5 wrapper for poppler
231 Summary(pl.UTF-8): Statyczna wersja wrappera Qt5 dla popplera
232 Group: Development/Libraries
233 Requires: %{name}-qt5-devel = %{version}-%{release}
235 %description qt5-static
236 Static version of Qt5 wrapper for poppler.
238 %description qt5-static -l pl.UTF-8
239 Statyczna wersja wrappera Qt5 dla popplera.
242 Summary: Set of tools for viewing information and converting PDF files
243 Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
244 Group: Applications/Publishing
247 Obsoletes: pdftohtml-pdftops
248 Obsoletes: poppler-utils
249 Obsoletes: xpdf-tools
252 Package contains utilites for PDF files. These utilities allow to
253 - extract information about PDF files,
254 - extract images from PDF files,
255 - convert PDF files to HTML, plain text and PS formats.
257 %description progs -l pl.UTF-8
258 Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
259 - wyświetlanie informacji o plikach PDF,
260 - wydobywanie obrazków z plików PDF,
261 - konwersję plików PDF do formatów takich jak HTML, PS czy też
273 %{!?with_cpp:-DENABLE_CPP=OFF} \
274 %{!?with_glib:-DENABLE_GLIB=OFF} \
275 %{?with_apidocs:-DENABLE_GTK_DOC=ON} \
276 -DENABLE_GTK_TESTS=OFF \
277 -DENABLE_LIBCURL=ON \
278 %{!?with_qt5:-DENABLE_QT5=OFF} \
279 %{!?with_qt6:-DENABLE_QT6=OFF} \
280 -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
282 %{!?with_cairo:-DWITH_CAIRO=OFF}
287 %if %{with static_libs}
288 install -d build-static
291 -DBUILD_SHARED_LIBS=OFF \
292 %{!?with_cpp:-DENABLE_CPP=OFF} \
293 %{!?with_glib:-DENABLE_GLIB=OFF} \
294 -DENABLE_GTK_DOC=OFF \
295 -DENABLE_GTK_TESTS=OFF \
296 -DENABLE_LIBCURL=ON \
297 %{!?with_qt5:-DENABLE_QT5=OFF} \
299 %{!?with_cairo:-DWITH_CAIRO=OFF}
305 rm -rf $RPM_BUILD_ROOT
307 %if %{with static_libs}
308 %{__make} -C build-static install \
309 DESTDIR=$RPM_BUILD_ROOT
312 %{__make} -C build install \
313 DESTDIR=$RPM_BUILD_ROOT
316 rm -rf $RPM_BUILD_ROOT
318 %post -p /sbin/ldconfig
319 %postun -p /sbin/ldconfig
321 %post cpp -p /sbin/ldconfig
322 %postun cpp -p /sbin/ldconfig
324 %post glib -p /sbin/ldconfig
325 %postun glib -p /sbin/ldconfig
327 %post qt5 -p /sbin/ldconfig
328 %postun qt5 -p /sbin/ldconfig
331 %defattr(644,root,root,755)
332 %doc AUTHORS ChangeLog NEWS README*
333 %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.*
334 %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.105
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_libdir}/libpoppler.so
339 %dir %{_includedir}/poppler
340 %{_includedir}/poppler/poppler-config.h
341 %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h
342 %{_includedir}/poppler/fofi
343 %{_includedir}/poppler/goo
344 %{_includedir}/poppler/splash
345 %{_pkgconfigdir}/poppler.pc
347 %if %{with static_libs}
349 %defattr(644,root,root,755)
350 %{_libdir}/libpoppler.a
355 %defattr(644,root,root,755)
356 %{_gtkdocdir}/poppler
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.*
363 %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so
368 %{_includedir}/poppler/cpp
369 %{_pkgconfigdir}/poppler-cpp.pc
371 %if %{with static_libs}
373 %defattr(644,root,root,755)
374 %{_libdir}/libpoppler-cpp.a
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.*
382 %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8
383 %{_libdir}/girepository-1.0/Poppler-0.18.typelib
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_libdir}/libpoppler-glib.so
388 %{_includedir}/poppler/glib
389 %{_pkgconfigdir}/poppler-glib.pc
390 %{_datadir}/gir-1.0/Poppler-0.18.gir
392 %if %{with static_libs}
394 %defattr(644,root,root,755)
395 %{_libdir}/libpoppler-glib.a
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.*
403 %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so
408 %{_includedir}/poppler/qt5
409 %{_pkgconfigdir}/poppler-qt5.pc
411 %if %{with static_libs}
413 %defattr(644,root,root,755)
414 %{_libdir}/libpoppler-qt5.a
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_bindir}/pdfattach
421 %attr(755,root,root) %{_bindir}/pdfdetach
422 %attr(755,root,root) %{_bindir}/pdffonts
423 %attr(755,root,root) %{_bindir}/pdfimages
424 %attr(755,root,root) %{_bindir}/pdfinfo
425 %attr(755,root,root) %{_bindir}/pdfseparate
426 %attr(755,root,root) %{_bindir}/pdfsig
427 %attr(755,root,root) %{_bindir}/pdftocairo
428 %attr(755,root,root) %{_bindir}/pdftohtml
429 %attr(755,root,root) %{_bindir}/pdftoppm
430 %attr(755,root,root) %{_bindir}/pdftops
431 %attr(755,root,root) %{_bindir}/pdftotext
432 %attr(755,root,root) %{_bindir}/pdfunite
433 %{_mandir}/man1/pdfattach.1*
434 %{_mandir}/man1/pdfdetach.1*
435 %{_mandir}/man1/pdffonts.1*
436 %{_mandir}/man1/pdfimages.1*
437 %{_mandir}/man1/pdfinfo.1*
438 %{_mandir}/man1/pdfseparate.1*
439 %{_mandir}/man1/pdfsig.1*
440 %{_mandir}/man1/pdftocairo.1*
441 %{_mandir}/man1/pdftohtml.1*
442 %{_mandir}/man1/pdftoppm.1*
443 %{_mandir}/man1/pdftops.1*
444 %{_mandir}/man1/pdftotext.1*
445 %{_mandir}/man1/pdfunite.1*