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: 3c4b500a0af4cf1dc4a1c66fa48b7551
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
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
68 BuildRequires: zlib-devel
69 Requires: openjpeg2 >= 2
70 Obsoletes: poppler-qt4-static
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74 A common PDF rendering library for integrating PDF viewing into
75 desktop applications (based on the xpdf-3.0 code base).
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).
82 Summary: Poppler header files
83 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler
84 Group: Development/Libraries
85 Requires: %{name} = %{version}-%{release}
87 Requires: lcms2-devel >= 2
88 Requires: libstdc++-devel >= 6:5.0
89 Requires: nss-devel >= 3.19
90 Conflicts: poppler0.61-devel
93 Header files for the Poppler library.
95 %description devel -l pl.UTF-8
96 Pliki nagłówkowe biblioteki Poppler.
99 Summary: Poppler static libraries
100 Summary(pl.UTF-8): Statyczne biblioteki Poppler
101 Group: Development/Libraries
102 Requires: %{name}-devel = %{version}-%{release}
105 Poppler static libraries.
107 %description static -l pl.UTF-8
108 Statyczne biblioteki Poppler.
111 Summary: Poppler library API documentation
112 Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler
114 Requires: gtk-doc-common
118 Poppler library API documentation.
120 %description apidocs -l pl.UTF-8
121 Dokumentacja API biblioteki Poppler.
124 Summary: Cpp wrapper for poppler
125 Summary(pl.UTF-8): Wrapper cpp dla popplera
127 Requires: %{name} = %{version}-%{release}
130 Cpp wrapper for poppler.
132 %description cpp -l pl.UTF-8
133 Wrapper cpp dla popplera.
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}
142 %description cpp-devel
143 Header files for cpp wrapper for poppler.
145 %description cpp-devel -l pl.UTF-8
146 Pliki nagłówkowe wrappera cpp dla popplera.
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}
154 %description cpp-static
155 Static version of cpp wrapper for poppler.
157 %description cpp-static -l pl.UTF-8
158 Statyczna wersja wrappera cpp dla popplera.
161 Summary: GLib wrapper for poppler
162 Summary(pl.UTF-8): Wrapper GLib dla popplera
164 Requires: %{name} = %{version}-%{release}
165 %{?with_cairo:Requires: cairo >= %{cairo_ver}}
166 Requires: glib2 >= 1:2.56
169 GLib wrapper for poppler.
171 %description glib -l pl.UTF-8
172 Wrapper GLib dla popplera.
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
183 %description glib-devel
184 Header files for GLib wrapper for poppler.
186 %description glib-devel -l pl.UTF-8
187 Pliki nagłówkowe wrappera GLib dla popplera.
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}
195 %description glib-static
196 Static version of GLib wrapper for poppler.
198 %description glib-static -l pl.UTF-8
199 Statyczna wersja wrappera GLib dla popplera.
202 Summary: Qt5 wrapper for poppler
203 Summary(pl.UTF-8): Wrapper Qt5 dla popplera
205 Requires: %{name} = %{version}-%{release}
208 Qt5 wrapper for poppler.
210 %description qt5 -l pl.UTF-8
211 Wrapper Qt5 dla popplera.
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}
224 %description qt5-devel
225 Header files for Qt5 wrapper for poppler.
227 %description qt5-devel -l pl.UTF-8
228 Pliki nagłówkowe wrapper Qt5 dla popplera.
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}
236 %description qt5-static
237 Static version of Qt5 wrapper for poppler.
239 %description qt5-static -l pl.UTF-8
240 Statyczna wersja wrappera Qt5 dla popplera.
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
248 Obsoletes: pdftohtml-pdftops
249 Obsoletes: poppler-utils
250 Obsoletes: xpdf-tools
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.
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ż
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 \
283 %{!?with_cairo:-DWITH_CAIRO=OFF}
288 %if %{with static_libs}
289 install -d build-static
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} \
300 %{!?with_cairo:-DWITH_CAIRO=OFF}
306 rm -rf $RPM_BUILD_ROOT
308 %if %{with static_libs}
309 %{__make} -C build-static install \
310 DESTDIR=$RPM_BUILD_ROOT
313 %{__make} -C build install \
314 DESTDIR=$RPM_BUILD_ROOT
317 rm -rf $RPM_BUILD_ROOT
319 %post -p /sbin/ldconfig
320 %postun -p /sbin/ldconfig
322 %post cpp -p /sbin/ldconfig
323 %postun cpp -p /sbin/ldconfig
325 %post glib -p /sbin/ldconfig
326 %postun glib -p /sbin/ldconfig
328 %post qt5 -p /sbin/ldconfig
329 %postun qt5 -p /sbin/ldconfig
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
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
349 %if %{with static_libs}
351 %defattr(644,root,root,755)
352 %{_libdir}/libpoppler.a
357 %defattr(644,root,root,755)
358 %{_gtkdocdir}/poppler
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
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so
370 %{_includedir}/poppler/cpp
371 %{_pkgconfigdir}/poppler-cpp.pc
373 %if %{with static_libs}
375 %defattr(644,root,root,755)
376 %{_libdir}/libpoppler-cpp.a
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
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
394 %if %{with static_libs}
396 %defattr(644,root,root,755)
397 %{_libdir}/libpoppler-glib.a
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
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so
410 %{_includedir}/poppler/qt5
411 %{_pkgconfigdir}/poppler-qt5.pc
413 %if %{with static_libs}
415 %defattr(644,root,root,755)
416 %{_libdir}/libpoppler-qt5.a
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*