3 %bcond_without apidocs # disable gtk-doc
4 %bcond_without cairo # disable Cairo backend
5 %bcond_without qt4 # disable qt4 wrapper
6 %bcond_without qt5 # disable qt5 wrapper
7 %bcond_without cpp # disable cpp wrapper
8 %bcond_without glib # disable glib wrapper
10 %define cairo_ver 1.10.0
11 Summary: PDF rendering library
12 Summary(pl.UTF-8): Biblioteka renderująca PDF
18 Source0: https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
19 # Source0-md5: 1d2b001663119855cdfbc0713dbfb9c6
20 Patch0: %{name}-qt5.patch
21 URL: https://poppler.freedesktop.org/
22 %{?with_qt5:BuildRequires: Qt5Core-devel >= 5.0.0}
23 %{?with_qt5:BuildRequires: Qt5Gui-devel >= 5.0.0}
24 %{?with_qt5:BuildRequires: Qt5Test-devel >= 5.0.0}
25 %{?with_qt5:BuildRequires: Qt5Widgets-devel >= 5.0.0}
26 %{?with_qt5:BuildRequires: Qt5Xml-devel >= 5.0.0}
27 %{?with_qt4:BuildRequires: QtCore-devel >= 4.7.0}
28 %{?with_qt4:BuildRequires: QtGui-devel >= 4.7.0}
29 %{?with_qt4:BuildRequires: QtTest-devel >= 4.7.0}
30 %{?with_qt4:BuildRequires: QtXml-devel >= 4.7.0}
31 BuildRequires: autoconf >= 2.59
32 BuildRequires: automake >= 1:1.7
33 %{?with_cairo:BuildRequires: cairo-devel >= %{cairo_ver}}
34 BuildRequires: curl-devel
35 BuildRequires: docbook-dtd412-xml
36 BuildRequires: fontconfig-devel >= 2.0.0
37 BuildRequires: freetype-devel >= 2.0
38 BuildRequires: gettext-tools
39 %{?with_glib:BuildRequires: glib2-devel >= 1:2.18.0}
40 BuildRequires: gobject-introspection-devel >= 0.6.7
41 %{?with_apidocs:BuildRequires: gtk-doc >= 1.14}
42 BuildRequires: lcms2-devel >= 2
43 BuildRequires: libjpeg-devel
44 BuildRequires: libpng-devel
45 BuildRequires: libstdc++-devel
46 BuildRequires: libtiff-devel
47 BuildRequires: libtool >= 2:1.5
48 BuildRequires: libxml2-devel >= 2.0
49 BuildRequires: nss-devel >= 3
50 # or openjpeg2-devel >= 2 with --enable-libopenjpeg=openjpeg2
51 BuildRequires: openjpeg-devel >= 1.5
52 BuildRequires: pkgconfig >= 1:0.18
53 # wanted cairo backends
54 BuildRequires: pkgconfig(cairo-pdf) >= %{cairo_ver}
55 BuildRequires: pkgconfig(cairo-ps) >= %{cairo_ver}
56 BuildRequires: pkgconfig(cairo-svg) >= %{cairo_ver}
57 %{?with_qt4:BuildRequires: qt4-build >= 4.4.0}
58 %{?with_qt5:BuildRequires: qt5-build >= 5.0.0}
59 BuildRequires: sed >= 4.0
60 BuildRequires: tar >= 1:1.22
63 BuildRequires: zlib-devel
64 Requires: openjpeg >= 1.5
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 A common PDF rendering library for integrating PDF viewing into
69 desktop applications (based on the xpdf-3.0 code base).
71 %description -l pl.UTF-8
72 Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w
73 aplikacjach desktopowych (oparta na kodzie xpdf-3.0).
76 Summary: Poppler header files
77 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler
78 Group: Development/Libraries
79 Requires: %{name} = %{version}-%{release}
81 Requires: lcms2-devel >= 2
82 Requires: libstdc++-devel
83 Requires: nss-devel >= 3
86 Header files for the Poppler library.
88 %description devel -l pl.UTF-8
89 Pliki nagłówkowe biblioteki Poppler.
92 Summary: Poppler static libraries
93 Summary(pl.UTF-8): Statyczne biblioteki Poppler
94 Group: Development/Libraries
95 Requires: %{name}-devel = %{version}-%{release}
98 Poppler static libraries.
100 %description static -l pl.UTF-8
101 Statyczne biblioteki Poppler.
104 Summary: Poppler library API documentation
105 Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler
107 Requires: gtk-doc-common
108 %if "%{_rpmversion}" >= "5"
113 Poppler library API documentation.
115 %description apidocs -l pl.UTF-8
116 Dokumentacja API biblioteki Poppler.
119 Summary: Cpp wrapper for poppler
120 Summary(pl.UTF-8): Wrapper cpp dla popplera
122 Requires: %{name} = %{version}-%{release}
125 Cpp wrapper for poppler.
127 %description cpp -l pl.UTF-8
128 Wrapper cpp dla popplera.
131 Summary: Header files for cpp wrapper for poppler
132 Summary(pl.UTF-8): Pliki nagłówkowe wrappera cpp dla popplera
133 Group: Development/Libraries
134 Requires: %{name}-cpp = %{version}-%{release}
135 Requires: %{name}-devel = %{version}-%{release}
137 %description cpp-devel
138 Header files for cpp wrapper for poppler.
140 %description cpp-devel -l pl.UTF-8
141 Pliki nagłówkowe wrappera cpp dla popplera.
144 Summary: Static version of cpp wrapper for poppler
145 Summary(pl.UTF-8): Statyczna wersja wrappera cpp dla popplera
146 Group: Development/Libraries
147 Requires: %{name}-cpp-devel = %{version}-%{release}
149 %description cpp-static
150 Static version of cpp wrapper for poppler.
152 %description cpp-static -l pl.UTF-8
153 Statyczna wersja wrappera cpp dla popplera.
156 Summary: GLib wrapper for poppler
157 Summary(pl.UTF-8): Wrapper GLib dla popplera
159 Requires: %{name} = %{version}-%{release}
160 %{?with_cairo:Requires: cairo >= %{cairo_ver}}
161 Requires: glib2 >= 1:2.18.0
164 GLib wrapper for poppler.
166 %description glib -l pl.UTF-8
167 Wrapper GLib dla popplera.
170 Summary: Header files for GLib wrapper for poppler
171 Summary(pl.UTF-8): Pliki nagłówkowe wrappera GLib dla popplera
172 Group: Development/Libraries
173 Requires: %{name}-devel = %{version}-%{release}
174 Requires: %{name}-glib = %{version}-%{release}
175 %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}}
176 Requires: glib2-devel >= 1:2.18.0
178 %description glib-devel
179 Header files for GLib wrapper for poppler.
181 %description glib-devel -l pl.UTF-8
182 Pliki nagłówkowe wrappera GLib dla popplera.
185 Summary: Static version of GLib wrapper for poppler
186 Summary(pl.UTF-8): Statyczna wersja wrappera GLib dla popplera
187 Group: Development/Libraries
188 Requires: %{name}-glib-devel = %{version}-%{release}
190 %description glib-static
191 Static version of GLib wrapper for poppler.
193 %description glib-static -l pl.UTF-8
194 Statyczna wersja wrappera GLib dla popplera.
197 Summary: Qt4 wrapper for poppler
198 Summary(pl.UTF-8): Wrapper Qt4 dla popplera
200 Requires: %{name} = %{version}-%{release}
201 Requires: QtCore >= 4.4.0
202 Requires: QtGui >= 4.4.0
203 Requires: QtXml >= 4.4.0
204 Provides: poppler-Qt = %{version}-%{release}
205 Obsoletes: poppler-Qt < 0.24.4-2
206 Obsoletes: poppler-qt
209 Qt4 wrapper for poppler.
211 %description qt4 -l pl.UTF-8
212 Wrapper Qt4 dla popplera.
215 Summary: Header files for Qt4 wrapper for poppler
216 Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt4 dla popplera
217 Group: Development/Libraries
218 Requires: %{name}-devel = %{version}-%{release}
219 Requires: %{name}-qt4 = %{version}-%{release}
220 Requires: QtCore-devel >= 4.4.0
221 Requires: QtGui-devel >= 4.4.0
222 Requires: QtXml-devel >= 4.4.0
223 Provides: poppler-Qt-devel = %{version}-%{release}
224 Obsoletes: poppler-Qt-devel < 0.24.4-2
225 Obsoletes: poppler-qt-devel
227 %description qt4-devel
228 Header files for Qt4 wrapper for poppler.
230 %description qt4-devel -l pl.UTF-8
231 Pliki nagłówkowe wrapper Qt4 dla popplera.
234 Summary: Static version of Qt4 wrapper for poppler
235 Summary(pl.UTF-8): Statyczna wersja wrappera Qt4 dla popplera
236 Group: Development/Libraries
237 Requires: %{name}-qt4-devel = %{version}-%{release}
238 Provides: poppler-Qt-static = %{version}-%{release}
239 Obsoletes: poppler-Qt-static < 0.24.4-2
240 Obsoletes: poppler-qt-static
242 %description qt4-static
243 Static version of Qt4 wrapper for poppler.
245 %description qt4-static -l pl.UTF-8
246 Statyczna wersja wrappera Qt4 dla popplera.
249 Summary: Qt5 wrapper for poppler
250 Summary(pl.UTF-8): Wrapper Qt5 dla popplera
252 Requires: %{name} = %{version}-%{release}
255 Qt5 wrapper for poppler.
257 %description qt5 -l pl.UTF-8
258 Wrapper Qt5 dla popplera.
261 Summary: Header files for Qt5 wrapper for poppler
262 Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt5 dla popplera
263 Group: Development/Libraries
264 Requires: %{name}-devel = %{version}-%{release}
265 Requires: %{name}-qt5 = %{version}-%{release}
266 Requires: Qt5Core-devel >= 5.0.0
267 Requires: Qt5Gui-devel >= 5.0.0
268 Requires: Qt5Widgets-devel >= 5.0.0
269 Requires: Qt5Xml-devel >= 5.0.0
271 %description qt5-devel
272 Header files for Qt5 wrapper for poppler.
274 %description qt5-devel -l pl.UTF-8
275 Pliki nagłówkowe wrapper Qt5 dla popplera.
278 Summary: Static version of Qt5 wrapper for poppler
279 Summary(pl.UTF-8): Statyczna wersja wrappera Qt5 dla popplera
280 Group: Development/Libraries
281 Requires: %{name}-qt5-devel = %{version}-%{release}
283 %description qt5-static
284 Static version of Qt5 wrapper for poppler.
286 %description qt5-static -l pl.UTF-8
287 Statyczna wersja wrappera Qt5 dla popplera.
290 Summary: Set of tools for viewing information and converting PDF files
291 Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
292 Group: Applications/Publishing
295 Obsoletes: pdftohtml-pdftops
296 Obsoletes: poppler-utils
297 Obsoletes: xpdf-tools
300 Package contains utilites for PDF files. These utilities allow to
301 - extract information about PDF files,
302 - extract images from PDF files,
303 - convert PDF files to HTML, plain text and PS formats.
305 %description progs -l pl.UTF-8
306 Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
307 - wyświetlanie informacji o plikach PDF,
308 - wydobywanie obrazków z plików PDF,
309 - konwersję plików PDF do formatów takich jak HTML, PS czy też
317 %{?with_apidocs:%{__gtkdocize}}
324 MOCQT4=/usr/bin/moc-qt4 \
325 MOCQT5=/usr/bin/moc-qt5 \
328 %{?with_apidocs:--enable-gtk-doc} \
329 %{!?with_cairo:--disable-cairo-output} \
330 %{!?with_cpp:--disable-poppler-cpp} \
331 %{!?with_glib:--disable-poppler-glib} \
332 %{!?with_qt4:--disable-poppler-qt4} \
333 %{!?with_qt5:--disable-poppler-qt5} \
334 --disable-silent-rules \
335 --enable-xpdf-headers \
337 --enable-dependency-tracking \
338 --with-html-dir=%{_gtkdocdir}
343 rm -rf $RPM_BUILD_ROOT
346 DESTDIR=$RPM_BUILD_ROOT
348 %if %{without apidocs}
349 # why it still installs them, brr
350 %{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/poppler || :
353 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
356 rm -rf $RPM_BUILD_ROOT
358 %post -p /sbin/ldconfig
359 %postun -p /sbin/ldconfig
361 %post cpp -p /sbin/ldconfig
362 %postun cpp -p /sbin/ldconfig
364 %post glib -p /sbin/ldconfig
365 %postun glib -p /sbin/ldconfig
367 %post qt4 -p /sbin/ldconfig
368 %postun qt4 -p /sbin/ldconfig
370 %post qt5 -p /sbin/ldconfig
371 %postun qt5 -p /sbin/ldconfig
374 %defattr(644,root,root,755)
375 %doc AUTHORS ChangeLog NEWS README* TODO
376 %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.*
377 %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.60
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/libpoppler.so
382 %dir %{_includedir}/poppler
383 %{_includedir}/poppler/poppler-config.h
384 %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h
385 %{_includedir}/poppler/fofi
386 %{_includedir}/poppler/goo
387 %{_includedir}/poppler/splash
388 %{_pkgconfigdir}/poppler.pc
389 %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc}
390 %{_pkgconfigdir}/poppler-splash.pc
393 %defattr(644,root,root,755)
394 %{_libdir}/libpoppler.a
398 %defattr(644,root,root,755)
399 %{_gtkdocdir}/poppler
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.*
406 %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so
411 %{_includedir}/poppler/cpp
412 %{_pkgconfigdir}/poppler-cpp.pc
415 %defattr(644,root,root,755)
416 %{_libdir}/libpoppler-cpp.a
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.*
423 %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8
424 %{_libdir}/girepository-1.0/Poppler-0.18.typelib
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_libdir}/libpoppler-glib.so
429 %{_includedir}/poppler/glib
430 %{_pkgconfigdir}/poppler-glib.pc
431 %{_datadir}/gir-1.0/Poppler-0.18.gir
434 %defattr(644,root,root,755)
435 %{_libdir}/libpoppler-glib.a
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/libpoppler-qt4.so.*.*.*
442 %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt4.so.4
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/libpoppler-qt4.so
447 %{_includedir}/poppler/qt4
448 %{_pkgconfigdir}/poppler-qt4.pc
451 %defattr(644,root,root,755)
452 %{_libdir}/libpoppler-qt4.a
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.*
459 %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so
464 %{_includedir}/poppler/qt5
465 %{_pkgconfigdir}/poppler-qt5.pc
468 %defattr(644,root,root,755)
469 %{_libdir}/libpoppler-qt5.a
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_bindir}/pdf*