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