]> git.pld-linux.org Git - packages/poppler.git/blob - poppler.spec
- updated to 0.42.0 (note: new libpoppler soname)
[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.42.0
15 Release:        1
16 License:        GPL v2+
17 Group:          Libraries
18 Source0:        https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
19 # Source0-md5:  c63efcde7d52b4135bb7463b04790862
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
61 BuildRequires:  which
62 BuildRequires:  xz
63 BuildRequires:  zlib-devel
64 Requires:       openjpeg >= 1.5
65 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67 %description
68 A common PDF rendering library for integrating PDF viewing into
69 desktop applications (based on the xpdf-3.0 code base).
70
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).
74
75 %package devel
76 Summary:        Poppler header files
77 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Poppler
78 Group:          Development/Libraries
79 Requires:       %{name} = %{version}-%{release}
80 Requires:       curl-devel
81 Requires:       lcms2-devel >= 2
82 Requires:       libstdc++-devel
83 Requires:       nss-devel >= 3
84
85 %description devel
86 Header files for the Poppler library.
87
88 %description devel -l pl.UTF-8
89 Pliki nagłówkowe biblioteki Poppler.
90
91 %package static
92 Summary:        Poppler static libraries
93 Summary(pl.UTF-8):      Statyczne biblioteki Poppler
94 Group:          Development/Libraries
95 Requires:       %{name}-devel = %{version}-%{release}
96
97 %description static
98 Poppler static libraries.
99
100 %description static -l pl.UTF-8
101 Statyczne biblioteki Poppler.
102
103 %package apidocs
104 Summary:        Poppler library API documentation
105 Summary(pl.UTF-8):      Dokumentacja API biblioteki Poppler
106 Group:          Documentation
107 Requires:       gtk-doc-common
108 %if "%{_rpmversion}" >= "5"
109 BuildArch:      noarch
110 %endif
111
112 %description apidocs
113 Poppler library API documentation.
114
115 %description apidocs -l pl.UTF-8
116 Dokumentacja API biblioteki Poppler.
117
118 %package cpp
119 Summary:        Cpp wrapper for poppler
120 Summary(pl.UTF-8):      Wrapper cpp dla popplera
121 Group:          Libraries
122 Requires:       %{name} = %{version}-%{release}
123
124 %description cpp
125 Cpp wrapper for poppler.
126
127 %description cpp -l pl.UTF-8
128 Wrapper cpp dla popplera.
129
130 %package cpp-devel
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}
136
137 %description cpp-devel
138 Header files for cpp wrapper for poppler.
139
140 %description cpp-devel -l pl.UTF-8
141 Pliki nagłówkowe wrappera cpp dla popplera.
142
143 %package cpp-static
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}
148
149 %description cpp-static
150 Static version of cpp wrapper for poppler.
151
152 %description cpp-static -l pl.UTF-8
153 Statyczna wersja wrappera cpp dla popplera.
154
155 %package glib
156 Summary:        GLib wrapper for poppler
157 Summary(pl.UTF-8):      Wrapper GLib dla popplera
158 Group:          Libraries
159 Requires:       %{name} = %{version}-%{release}
160 %{?with_cairo:Requires: cairo >= %{cairo_ver}}
161 Requires:       glib2 >= 1:2.18.0
162
163 %description glib
164 GLib wrapper for poppler.
165
166 %description glib -l pl.UTF-8
167 Wrapper GLib dla popplera.
168
169 %package glib-devel
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
177
178 %description glib-devel
179 Header files for GLib wrapper for poppler.
180
181 %description glib-devel -l pl.UTF-8
182 Pliki nagłówkowe wrappera GLib dla popplera.
183
184 %package glib-static
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}
189
190 %description glib-static
191 Static version of GLib wrapper for poppler.
192
193 %description glib-static -l pl.UTF-8
194 Statyczna wersja wrappera GLib dla popplera.
195
196 %package qt4
197 Summary:        Qt4 wrapper for poppler
198 Summary(pl.UTF-8):      Wrapper Qt4 dla popplera
199 Group:          Libraries
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
207
208 %description qt4
209 Qt4 wrapper for poppler.
210
211 %description qt4 -l pl.UTF-8
212 Wrapper Qt4 dla popplera.
213
214 %package qt4-devel
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
226
227 %description qt4-devel
228 Header files for Qt4 wrapper for poppler.
229
230 %description qt4-devel -l pl.UTF-8
231 Pliki nagłówkowe wrapper Qt4 dla popplera.
232
233 %package qt4-static
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
241
242 %description qt4-static
243 Static version of Qt4 wrapper for poppler.
244
245 %description qt4-static -l pl.UTF-8
246 Statyczna wersja wrappera Qt4 dla popplera.
247
248 %package qt5
249 Summary:        Qt5 wrapper for poppler
250 Summary(pl.UTF-8):      Wrapper Qt5 dla popplera
251 Group:          Libraries
252 Requires:       %{name} = %{version}-%{release}
253
254 %description qt5
255 Qt5 wrapper for poppler.
256
257 %description qt5 -l pl.UTF-8
258 Wrapper Qt5 dla popplera.
259
260 %package qt5-devel
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
270
271 %description qt5-devel
272 Header files for Qt5 wrapper for poppler.
273
274 %description qt5-devel -l pl.UTF-8
275 Pliki nagłówkowe wrapper Qt5 dla popplera.
276
277 %package qt5-static
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}
282
283 %description qt5-static
284 Static version of Qt5 wrapper for poppler.
285
286 %description qt5-static -l pl.UTF-8
287 Statyczna wersja wrappera Qt5 dla popplera.
288
289 %package progs
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
293 Provides:       pdftops
294 Obsoletes:      pdftohtml
295 Obsoletes:      pdftohtml-pdftops
296 Obsoletes:      poppler-utils
297 Obsoletes:      xpdf-tools
298
299 %description progs
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.
304
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ż
310   czystego tekstu.
311
312 %prep
313 %setup -q
314 %patch0 -p1
315
316 %build
317 %{?with_apidocs:%{__gtkdocize}}
318 %{__libtoolize}
319 %{__aclocal} -I m4
320 %{__autoconf} -f
321 %{__autoheader}
322 %{__automake}
323 %configure \
324         MOCQT4=/usr/bin/moc-qt4 \
325         MOCQT5=/usr/bin/moc-qt5 \
326         --disable-gtk-test \
327         --enable-libcurl \
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 \
336         --enable-zlib \
337         --enable-dependency-tracking \
338         --with-html-dir=%{_gtkdocdir}
339
340 %{__make}
341
342 %install
343 rm -rf $RPM_BUILD_ROOT
344
345 %{__make} install \
346         DESTDIR=$RPM_BUILD_ROOT
347
348 %if %{without apidocs}
349 # why it still installs them, brr
350 %{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/poppler || :
351 %endif
352
353 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
354
355 %clean
356 rm -rf $RPM_BUILD_ROOT
357
358 %post   -p /sbin/ldconfig
359 %postun -p /sbin/ldconfig
360
361 %post   cpp -p /sbin/ldconfig
362 %postun cpp -p /sbin/ldconfig
363
364 %post   glib -p /sbin/ldconfig
365 %postun glib -p /sbin/ldconfig
366
367 %post   qt4 -p /sbin/ldconfig
368 %postun qt4 -p /sbin/ldconfig
369
370 %post   qt5 -p /sbin/ldconfig
371 %postun qt5 -p /sbin/ldconfig
372
373 %files
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.59
378
379 %files devel
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
391
392 %files static
393 %defattr(644,root,root,755)
394 %{_libdir}/libpoppler.a
395
396 %if %{with apidocs}
397 %files apidocs
398 %defattr(644,root,root,755)
399 %{_gtkdocdir}/poppler
400 %endif
401
402 %if %{with cpp}
403 %files cpp
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
407
408 %files cpp-devel
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so
411 %{_includedir}/poppler/cpp
412 %{_pkgconfigdir}/poppler-cpp.pc
413
414 %files cpp-static
415 %defattr(644,root,root,755)
416 %{_libdir}/libpoppler-cpp.a
417 %endif
418
419 %if %{with glib}
420 %files glib
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
425
426 %files glib-devel
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
432
433 %files glib-static
434 %defattr(644,root,root,755)
435 %{_libdir}/libpoppler-glib.a
436 %endif
437
438 %if %{with qt4}
439 %files qt4
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
443
444 %files qt4-devel
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/libpoppler-qt4.so
447 %{_includedir}/poppler/qt4
448 %{_pkgconfigdir}/poppler-qt4.pc
449
450 %files qt4-static
451 %defattr(644,root,root,755)
452 %{_libdir}/libpoppler-qt4.a
453 %endif
454
455 %if %{with qt5}
456 %files qt5
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
460
461 %files qt5-devel
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so
464 %{_includedir}/poppler/qt5
465 %{_pkgconfigdir}/poppler-qt5.pc
466
467 %files qt5-static
468 %defattr(644,root,root,755)
469 %{_libdir}/libpoppler-qt5.a
470 %endif
471
472 %files progs
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_bindir}/pdf*
475 %{_mandir}/man1/pdf*
This page took 0.072588 seconds and 4 git commands to generate.