]>
Commit | Line | Data |
---|---|---|
59f6d029 | 1 | # |
708b49cb | 2 | # Conditional build: |
8d5d1be9 | 3 | %bcond_without apidocs # disable gtk-doc |
7122799d | 4 | %bcond_without cairo # disable Cairo backend |
bc4f318c | 5 | %bcond_without qt5 # disable qt5 wrapper |
931ab1e2 | 6 | %bcond_without cpp # disable cpp wrapper |
cfe3ca2f | 7 | %bcond_without glib # disable glib wrapper |
d735c4a7 | 8 | |
a6475984 | 9 | %define cairo_ver 1.10.0 |
7a448eaa | 10 | %define qt5_ver 5.0.0 |
9e116569 | 11 | Summary: PDF rendering library |
ef9a130a | 12 | Summary(pl.UTF-8): Biblioteka renderująca PDF |
9e116569 | 13 | Name: poppler |
fbf0c290 JP |
14 | Version: 0.65.0 |
15 | Release: 1 | |
434ea14d | 16 | License: GPL v2+ |
9e116569 | 17 | Group: Libraries |
c32fd9f2 | 18 | Source0: https://poppler.freedesktop.org/%{name}-%{version}.tar.xz |
fbf0c290 | 19 | # Source0-md5: b9a0af02e43deb26265f130343e90d78 |
385007c9 | 20 | Patch0: %{name}-gtkdocdir.patch |
c32fd9f2 | 21 | URL: https://poppler.freedesktop.org/ |
7a448eaa JP |
22 | %{?with_qt5:BuildRequires: Qt5Core-devel >= %{qt5_ver}} |
23 | %{?with_qt5:BuildRequires: Qt5Gui-devel >= %{qt5_ver}} | |
24 | %{?with_qt5:BuildRequires: Qt5Test-devel >= %{qt5_ver}} | |
25 | %{?with_qt5:BuildRequires: Qt5Widgets-devel >= %{qt5_ver}} | |
26 | %{?with_qt5:BuildRequires: Qt5Xml-devel >= %{qt5_ver}} | |
e2a6dd23 | 27 | %{?with_cairo:BuildRequires: cairo-devel >= %{cairo_ver}} |
385007c9 | 28 | BuildRequires: cmake >= 3.1.0 |
bd2cd4db | 29 | BuildRequires: curl-devel |
ea3f193d | 30 | BuildRequires: docbook-dtd412-xml |
d84a04fd | 31 | BuildRequires: fontconfig-devel >= 2.0.0 |
708b49cb | 32 | BuildRequires: freetype-devel >= 2.0 |
9499f754 | 33 | BuildRequires: gettext-tools |
d80ed3f3 | 34 | %{?with_glib:BuildRequires: glib2-devel >= 1:2.41} |
385007c9 | 35 | BuildRequires: gobject-introspection-devel >= 0.9.12 |
a6475984 | 36 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.14} |
3d571130 | 37 | BuildRequires: lcms2-devel >= 2 |
9e1eea06 | 38 | BuildRequires: libjpeg-devel |
d9c2dc15 | 39 | BuildRequires: libpng-devel |
5316425b | 40 | BuildRequires: libstdc++-devel >= 6:4.7 |
d9c2dc15 | 41 | BuildRequires: libtiff-devel |
9148ca80 | 42 | BuildRequires: libxml2-devel >= 2.0 |
c32fd9f2 | 43 | BuildRequires: nss-devel >= 3 |
d80ed3f3 | 44 | BuildRequires: openjpeg2-devel >= 2 |
a6475984 | 45 | BuildRequires: pkgconfig >= 1:0.18 |
5ee7d9e8 JB |
46 | # wanted cairo backends |
47 | BuildRequires: pkgconfig(cairo-pdf) >= %{cairo_ver} | |
48 | BuildRequires: pkgconfig(cairo-ps) >= %{cairo_ver} | |
49 | BuildRequires: pkgconfig(cairo-svg) >= %{cairo_ver} | |
7a448eaa | 50 | %{?with_qt5:BuildRequires: qt5-build >= %{qt5_ver}} |
21021625 | 51 | BuildRequires: sed >= 4.0 |
75fd4c8d | 52 | BuildRequires: tar >= 1:1.22 |
d735c4a7 | 53 | BuildRequires: which |
75fd4c8d | 54 | BuildRequires: xz |
bf5184f7 | 55 | BuildRequires: zlib-devel |
d80ed3f3 | 56 | Requires: openjpeg2 >= 2 |
385007c9 | 57 | Obsoletes: poppler-qt4-static |
fbf0c290 | 58 | Conflicts: poppler61-devel |
9e116569 | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
60 | ||
61 | %description | |
256ec317 | 62 | A common PDF rendering library for integrating PDF viewing into |
63 | desktop applications (based on the xpdf-3.0 code base). | |
9e116569 | 64 | |
4d968103 JR |
65 | %description -l pl.UTF-8 |
66 | Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w | |
943507a4 JB |
67 | aplikacjach desktopowych (oparta na kodzie xpdf-3.0). |
68 | ||
9e116569 | 69 | %package devel |
943507a4 | 70 | Summary: Poppler header files |
ef9a130a | 71 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler |
9e116569 | 72 | Group: Development/Libraries |
73 | Requires: %{name} = %{version}-%{release} | |
d9c2dc15 | 74 | Requires: curl-devel |
3d571130 | 75 | Requires: lcms2-devel >= 2 |
5316425b | 76 | Requires: libstdc++-devel >= 6:4.7 |
c32fd9f2 | 77 | Requires: nss-devel >= 3 |
9e116569 | 78 | |
79 | %description devel | |
943507a4 JB |
80 | Header files for the Poppler library. |
81 | ||
4d968103 JR |
82 | %description devel -l pl.UTF-8 |
83 | Pliki nagłówkowe biblioteki Poppler. | |
9e116569 | 84 | |
85 | %package static | |
86 | Summary: Poppler static libraries | |
ef9a130a | 87 | Summary(pl.UTF-8): Statyczne biblioteki Poppler |
9e116569 | 88 | Group: Development/Libraries |
89 | Requires: %{name}-devel = %{version}-%{release} | |
90 | ||
91 | %description static | |
92 | Poppler static libraries. | |
93 | ||
4d968103 | 94 | %description static -l pl.UTF-8 |
943507a4 JB |
95 | Statyczne biblioteki Poppler. |
96 | ||
356581a6 MB |
97 | %package apidocs |
98 | Summary: Poppler library API documentation | |
99 | Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler | |
100 | Group: Documentation | |
101 | Requires: gtk-doc-common | |
d735c4a7 ER |
102 | %if "%{_rpmversion}" >= "5" |
103 | BuildArch: noarch | |
104 | %endif | |
356581a6 MB |
105 | |
106 | %description apidocs | |
107 | Poppler library API documentation. | |
108 | ||
109 | %description apidocs -l pl.UTF-8 | |
110 | Dokumentacja API biblioteki Poppler. | |
111 | ||
931ab1e2 | 112 | %package cpp |
113 | Summary: Cpp wrapper for poppler | |
114 | Summary(pl.UTF-8): Wrapper cpp dla popplera | |
115 | Group: Libraries | |
116 | Requires: %{name} = %{version}-%{release} | |
117 | ||
118 | %description cpp | |
119 | Cpp wrapper for poppler. | |
120 | ||
121 | %description cpp -l pl.UTF-8 | |
122 | Wrapper cpp dla popplera. | |
123 | ||
124 | %package cpp-devel | |
125 | Summary: Header files for cpp wrapper for poppler | |
126 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera cpp dla popplera | |
127 | Group: Development/Libraries | |
128 | Requires: %{name}-cpp = %{version}-%{release} | |
129 | Requires: %{name}-devel = %{version}-%{release} | |
130 | ||
131 | %description cpp-devel | |
132 | Header files for cpp wrapper for poppler. | |
133 | ||
134 | %description cpp-devel -l pl.UTF-8 | |
135 | Pliki nagłówkowe wrappera cpp dla popplera. | |
136 | ||
fbf0c290 JP |
137 | %package cpp-static |
138 | Summary: Static version of cpp wrapper for poppler | |
139 | Summary(pl.UTF-8): Statyczna wersja wrappera cpp dla popplera | |
140 | Group: Development/Libraries | |
141 | Requires: %{name}-cpp-devel = %{version}-%{release} | |
142 | ||
143 | %description cpp-static | |
144 | Static version of cpp wrapper for poppler. | |
145 | ||
146 | %description cpp-static -l pl.UTF-8 | |
147 | Statyczna wersja wrappera cpp dla popplera. | |
148 | ||
c858408d JB |
149 | %package glib |
150 | Summary: GLib wrapper for poppler | |
ef9a130a | 151 | Summary(pl.UTF-8): Wrapper GLib dla popplera |
c858408d JB |
152 | Group: Libraries |
153 | Requires: %{name} = %{version}-%{release} | |
59f6d029 | 154 | %{?with_cairo:Requires: cairo >= %{cairo_ver}} |
d80ed3f3 | 155 | Requires: glib2 >= 1:2.41 |
c858408d JB |
156 | |
157 | %description glib | |
158 | GLib wrapper for poppler. | |
159 | ||
4d968103 | 160 | %description glib -l pl.UTF-8 |
c858408d JB |
161 | Wrapper GLib dla popplera. |
162 | ||
163 | %package glib-devel | |
164 | Summary: Header files for GLib wrapper for poppler | |
ef9a130a | 165 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera GLib dla popplera |
c858408d JB |
166 | Group: Development/Libraries |
167 | Requires: %{name}-devel = %{version}-%{release} | |
168 | Requires: %{name}-glib = %{version}-%{release} | |
59f6d029 | 169 | %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}} |
d80ed3f3 | 170 | Requires: glib2-devel >= 1:2.41 |
c858408d JB |
171 | |
172 | %description glib-devel | |
173 | Header files for GLib wrapper for poppler. | |
174 | ||
4d968103 JR |
175 | %description glib-devel -l pl.UTF-8 |
176 | Pliki nagłówkowe wrappera GLib dla popplera. | |
c858408d | 177 | |
fbf0c290 JP |
178 | %package glib-static |
179 | Summary: Static version of GLib wrapper for poppler | |
180 | Summary(pl.UTF-8): Statyczna wersja wrappera GLib dla popplera | |
181 | Group: Development/Libraries | |
182 | Requires: %{name}-glib-devel = %{version}-%{release} | |
183 | ||
184 | %description glib-static | |
185 | Static version of GLib wrapper for poppler. | |
186 | ||
187 | %description glib-static -l pl.UTF-8 | |
188 | Statyczna wersja wrappera GLib dla popplera. | |
3ed2c139 | 189 | |
bc4f318c JB |
190 | %package qt5 |
191 | Summary: Qt5 wrapper for poppler | |
192 | Summary(pl.UTF-8): Wrapper Qt5 dla popplera | |
193 | Group: Libraries | |
194 | Requires: %{name} = %{version}-%{release} | |
195 | ||
196 | %description qt5 | |
197 | Qt5 wrapper for poppler. | |
198 | ||
199 | %description qt5 -l pl.UTF-8 | |
200 | Wrapper Qt5 dla popplera. | |
201 | ||
202 | %package qt5-devel | |
203 | Summary: Header files for Qt5 wrapper for poppler | |
204 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt5 dla popplera | |
205 | Group: Development/Libraries | |
bc4f318c | 206 | Requires: %{name}-devel = %{version}-%{release} |
d735c4a7 | 207 | Requires: %{name}-qt5 = %{version}-%{release} |
7a448eaa JP |
208 | Requires: Qt5Core-devel >= %{qt5_ver} |
209 | Requires: Qt5Gui-devel >= %{qt5_ver} | |
210 | Requires: Qt5Widgets-devel >= %{qt5_ver} | |
211 | Requires: Qt5Xml-devel >= %{qt5_ver} | |
bc4f318c JB |
212 | |
213 | %description qt5-devel | |
214 | Header files for Qt5 wrapper for poppler. | |
215 | ||
216 | %description qt5-devel -l pl.UTF-8 | |
217 | Pliki nagłówkowe wrapper Qt5 dla popplera. | |
218 | ||
fbf0c290 JP |
219 | %package qt5-static |
220 | Summary: Static version of Qt5 wrapper for poppler | |
221 | Summary(pl.UTF-8): Statyczna wersja wrappera Qt5 dla popplera | |
222 | Group: Development/Libraries | |
223 | Requires: %{name}-qt5-devel = %{version}-%{release} | |
224 | ||
225 | %description qt5-static | |
226 | Static version of Qt5 wrapper for poppler. | |
227 | ||
228 | %description qt5-static -l pl.UTF-8 | |
229 | Statyczna wersja wrappera Qt5 dla popplera. | |
230 | ||
3085c5f7 | 231 | %package progs |
6d515f80 | 232 | Summary: Set of tools for viewing information and converting PDF files |
ef9a130a | 233 | Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF |
6d515f80 | 234 | Group: Applications/Publishing |
6d515f80 | 235 | Provides: pdftops |
236 | Obsoletes: pdftohtml | |
237 | Obsoletes: pdftohtml-pdftops | |
5ba7dac4 | 238 | Obsoletes: poppler-utils |
9148ca80 | 239 | Obsoletes: xpdf-tools |
6d515f80 | 240 | |
3085c5f7 | 241 | %description progs |
4be74f1d | 242 | Package contains utilites for PDF files. These utilities allow to |
bd2cd4db TP |
243 | - extract information about PDF files, |
244 | - extract images from PDF files, | |
245 | - convert PDF files to HTML, plain text and PS formats. | |
6d515f80 | 246 | |
4d968103 | 247 | %description progs -l pl.UTF-8 |
9117833e | 248 | Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają |
bd2cd4db TP |
249 | - wyświetlanie informacji o plikach PDF, |
250 | - wydobywanie obrazków z plików PDF, | |
2ddaee26 | 251 | - konwersję plików PDF do formatów takich jak HTML, PS czy też |
bd2cd4db | 252 | czystego tekstu. |
6d515f80 | 253 | |
9e116569 | 254 | %prep |
255 | %setup -q | |
385007c9 | 256 | %patch0 -p1 |
59f6d029 | 257 | |
9e116569 | 258 | %build |
385007c9 JP |
259 | install -d build |
260 | cd build | |
261 | %cmake .. \ | |
262 | -DENABLE_GTK_TESTS=OFF \ | |
263 | -DENABLE_LIBCURL=ON \ | |
264 | %{?with_apidocs:-DENABLE_GTK_DOC=ON} \ | |
265 | %{!?with_cairo:-DWITH_CAIRO=OFF} \ | |
266 | %{!?with_cpp:-DENABLE_CPP=OFF} \ | |
267 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
268 | %{!?with_qt5:-DENABLE_QT5=OFF} \ | |
269 | -DENABLE_XPDF_HEADERS=ON \ | |
270 | -DENABLE_ZLIB=ON | |
271 | ||
272 | %{__make} | |
273 | cd .. | |
274 | ||
275 | install -d build-static | |
276 | cd build-static | |
277 | %cmake .. \ | |
278 | -DBUILD_SHARED_LIBS=OFF \ | |
279 | -DENABLE_GTK_TESTS=OFF \ | |
280 | -DENABLE_LIBCURL=ON \ | |
6a04f0ad | 281 | -DENABLE_GTK_DOC=OFF \ |
385007c9 JP |
282 | %{!?with_cairo:-DWITH_CAIRO=OFF} \ |
283 | %{!?with_cpp:-DENABLE_CPP=OFF} \ | |
284 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
285 | %{!?with_qt5:-DENABLE_QT5=OFF} \ | |
286 | -DENABLE_XPDF_HEADERS=ON \ | |
287 | -DENABLE_ZLIB=ON | |
9148ca80 | 288 | |
9e116569 | 289 | %{__make} |
290 | ||
291 | %install | |
292 | rm -rf $RPM_BUILD_ROOT | |
293 | ||
385007c9 | 294 | %{__make} -C build-static install \ |
9e116569 | 295 | DESTDIR=$RPM_BUILD_ROOT |
296 | ||
385007c9 JP |
297 | %{__make} -C build install \ |
298 | DESTDIR=$RPM_BUILD_ROOT | |
797490cf | 299 | |
9e116569 | 300 | %clean |
301 | rm -rf $RPM_BUILD_ROOT | |
302 | ||
943507a4 JB |
303 | %post -p /sbin/ldconfig |
304 | %postun -p /sbin/ldconfig | |
9e116569 | 305 | |
d84a04fd JB |
306 | %post cpp -p /sbin/ldconfig |
307 | %postun cpp -p /sbin/ldconfig | |
308 | ||
c858408d JB |
309 | %post glib -p /sbin/ldconfig |
310 | %postun glib -p /sbin/ldconfig | |
311 | ||
bc4f318c JB |
312 | %post qt5 -p /sbin/ldconfig |
313 | %postun qt5 -p /sbin/ldconfig | |
dff19bfc | 314 | |
9e116569 | 315 | %files |
316 | %defattr(644,root,root,755) | |
385007c9 | 317 | %doc AUTHORS ChangeLog NEWS README* |
c858408d | 318 | %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.* |
fbf0c290 | 319 | %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.76 |
9e116569 | 320 | |
321 | %files devel | |
322 | %defattr(644,root,root,755) | |
c858408d | 323 | %attr(755,root,root) %{_libdir}/libpoppler.so |
9e1eea06 JB |
324 | %dir %{_includedir}/poppler |
325 | %{_includedir}/poppler/poppler-config.h | |
35d1caed | 326 | %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h |
40c95880 | 327 | %{_includedir}/poppler/fofi |
d84a04fd | 328 | %{_includedir}/poppler/goo |
9e1eea06 | 329 | %{_includedir}/poppler/splash |
c858408d JB |
330 | %{_pkgconfigdir}/poppler.pc |
331 | %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc} | |
332 | %{_pkgconfigdir}/poppler-splash.pc | |
9e116569 | 333 | |
334 | %files static | |
335 | %defattr(644,root,root,755) | |
c858408d JB |
336 | %{_libdir}/libpoppler.a |
337 | ||
356581a6 MB |
338 | %if %{with apidocs} |
339 | %files apidocs | |
340 | %defattr(644,root,root,755) | |
341 | %{_gtkdocdir}/poppler | |
342 | %endif | |
343 | ||
cfe3ca2f | 344 | %if %{with cpp} |
931ab1e2 | 345 | %files cpp |
346 | %defattr(644,root,root,755) | |
347 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.* | |
348 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0 | |
349 | ||
350 | %files cpp-devel | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so | |
931ab1e2 | 353 | %{_includedir}/poppler/cpp |
354 | %{_pkgconfigdir}/poppler-cpp.pc | |
fbf0c290 JP |
355 | |
356 | %files cpp-static | |
357 | %defattr(644,root,root,755) | |
358 | %{_libdir}/libpoppler-cpp.a | |
a7573488 | 359 | %endif |
931ab1e2 | 360 | |
cfe3ca2f | 361 | %if %{with glib} |
c858408d JB |
362 | %files glib |
363 | %defattr(644,root,root,755) | |
364 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.* | |
35d1caed AM |
365 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8 |
366 | %{_libdir}/girepository-1.0/Poppler-0.18.typelib | |
c858408d JB |
367 | |
368 | %files glib-devel | |
369 | %defattr(644,root,root,755) | |
370 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so | |
c858408d JB |
371 | %{_includedir}/poppler/glib |
372 | %{_pkgconfigdir}/poppler-glib.pc | |
35d1caed | 373 | %{_datadir}/gir-1.0/Poppler-0.18.gir |
fbf0c290 JP |
374 | |
375 | %files glib-static | |
376 | %defattr(644,root,root,755) | |
377 | %{_libdir}/libpoppler-glib.a | |
a7573488 | 378 | %endif |
c858408d | 379 | |
fbf0c290 | 380 | |
bc4f318c JB |
381 | %if %{with qt5} |
382 | %files qt5 | |
383 | %defattr(644,root,root,755) | |
384 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.* | |
385 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1 | |
386 | ||
387 | %files qt5-devel | |
388 | %defattr(644,root,root,755) | |
389 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so | |
390 | %{_includedir}/poppler/qt5 | |
391 | %{_pkgconfigdir}/poppler-qt5.pc | |
fbf0c290 JP |
392 | |
393 | %files qt5-static | |
394 | %defattr(644,root,root,755) | |
395 | %{_libdir}/libpoppler-qt5.a | |
a7573488 | 396 | %endif |
bc4f318c | 397 | |
3085c5f7 | 398 | %files progs |
6d515f80 | 399 | %defattr(644,root,root,755) |
6d74da5a JB |
400 | %attr(755,root,root) %{_bindir}/pdfdetach |
401 | %attr(755,root,root) %{_bindir}/pdffonts | |
402 | %attr(755,root,root) %{_bindir}/pdfimages | |
403 | %attr(755,root,root) %{_bindir}/pdfinfo | |
404 | %attr(755,root,root) %{_bindir}/pdfseparate | |
405 | %attr(755,root,root) %{_bindir}/pdfsig | |
406 | %attr(755,root,root) %{_bindir}/pdftocairo | |
407 | %attr(755,root,root) %{_bindir}/pdftohtml | |
408 | %attr(755,root,root) %{_bindir}/pdftoppm | |
409 | %attr(755,root,root) %{_bindir}/pdftops | |
410 | %attr(755,root,root) %{_bindir}/pdftotext | |
411 | %attr(755,root,root) %{_bindir}/pdfunite | |
412 | %{_mandir}/man1/pdfdetach.1* | |
413 | %{_mandir}/man1/pdffonts.1* | |
414 | %{_mandir}/man1/pdfimages.1* | |
415 | %{_mandir}/man1/pdfinfo.1* | |
416 | %{_mandir}/man1/pdfseparate.1* | |
417 | %{_mandir}/man1/pdfsig.1* | |
418 | %{_mandir}/man1/pdftocairo.1* | |
419 | %{_mandir}/man1/pdftohtml.1* | |
420 | %{_mandir}/man1/pdftoppm.1* | |
421 | %{_mandir}/man1/pdftops.1* | |
422 | %{_mandir}/man1/pdftotext.1* | |
423 | %{_mandir}/man1/pdfunite.1* |