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