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