]>
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 |
e54781b3 | 14 | Version: 0.75.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 |
e54781b3 | 19 | # Source0-md5: 3fb4ca803d989742695ca586c5cc489e |
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} |
89fbe7ee | 35 | %{?with_glib: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 |
89fbe7ee JB |
40 | # -std=c++14 |
41 | BuildRequires: libstdc++-devel >= 6:5.0 | |
d9c2dc15 | 42 | BuildRequires: libtiff-devel |
9148ca80 | 43 | BuildRequires: libxml2-devel >= 2.0 |
89fbe7ee | 44 | BuildRequires: nss-devel >= 3.19 |
d80ed3f3 | 45 | BuildRequires: openjpeg2-devel >= 2 |
a6475984 | 46 | BuildRequires: pkgconfig >= 1:0.18 |
5ee7d9e8 JB |
47 | # wanted cairo backends |
48 | BuildRequires: pkgconfig(cairo-pdf) >= %{cairo_ver} | |
49 | BuildRequires: pkgconfig(cairo-ps) >= %{cairo_ver} | |
50 | BuildRequires: pkgconfig(cairo-svg) >= %{cairo_ver} | |
7a448eaa | 51 | %{?with_qt5:BuildRequires: qt5-build >= %{qt5_ver}} |
21021625 | 52 | BuildRequires: sed >= 4.0 |
75fd4c8d | 53 | BuildRequires: tar >= 1:1.22 |
d735c4a7 | 54 | BuildRequires: which |
75fd4c8d | 55 | BuildRequires: xz |
bf5184f7 | 56 | BuildRequires: zlib-devel |
d80ed3f3 | 57 | Requires: openjpeg2 >= 2 |
385007c9 | 58 | Obsoletes: poppler-qt4-static |
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 |
953a3e47 | 76 | Requires: libstdc++-devel >= 6:5.0 |
89fbe7ee | 77 | Requires: nss-devel >= 3.19 |
1f25451e | 78 | Conflicts: poppler0.61-devel |
9e116569 | 79 | |
80 | %description devel | |
943507a4 JB |
81 | Header files for the Poppler library. |
82 | ||
4d968103 JR |
83 | %description devel -l pl.UTF-8 |
84 | Pliki nagłówkowe biblioteki Poppler. | |
9e116569 | 85 | |
86 | %package static | |
87 | Summary: Poppler static libraries | |
ef9a130a | 88 | Summary(pl.UTF-8): Statyczne biblioteki Poppler |
9e116569 | 89 | Group: Development/Libraries |
90 | Requires: %{name}-devel = %{version}-%{release} | |
91 | ||
92 | %description static | |
93 | Poppler static libraries. | |
94 | ||
4d968103 | 95 | %description static -l pl.UTF-8 |
943507a4 JB |
96 | Statyczne biblioteki Poppler. |
97 | ||
356581a6 MB |
98 | %package apidocs |
99 | Summary: Poppler library API documentation | |
100 | Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler | |
101 | Group: Documentation | |
102 | Requires: gtk-doc-common | |
d735c4a7 ER |
103 | %if "%{_rpmversion}" >= "5" |
104 | BuildArch: noarch | |
105 | %endif | |
356581a6 MB |
106 | |
107 | %description apidocs | |
108 | Poppler library API documentation. | |
109 | ||
110 | %description apidocs -l pl.UTF-8 | |
111 | Dokumentacja API biblioteki Poppler. | |
112 | ||
931ab1e2 | 113 | %package cpp |
114 | Summary: Cpp wrapper for poppler | |
115 | Summary(pl.UTF-8): Wrapper cpp dla popplera | |
116 | Group: Libraries | |
117 | Requires: %{name} = %{version}-%{release} | |
118 | ||
119 | %description cpp | |
120 | Cpp wrapper for poppler. | |
121 | ||
122 | %description cpp -l pl.UTF-8 | |
123 | Wrapper cpp dla popplera. | |
124 | ||
125 | %package cpp-devel | |
126 | Summary: Header files for cpp wrapper for poppler | |
127 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera cpp dla popplera | |
128 | Group: Development/Libraries | |
129 | Requires: %{name}-cpp = %{version}-%{release} | |
130 | Requires: %{name}-devel = %{version}-%{release} | |
131 | ||
132 | %description cpp-devel | |
133 | Header files for cpp wrapper for poppler. | |
134 | ||
135 | %description cpp-devel -l pl.UTF-8 | |
136 | Pliki nagłówkowe wrappera cpp dla popplera. | |
137 | ||
fbf0c290 JP |
138 | %package cpp-static |
139 | Summary: Static version of cpp wrapper for poppler | |
140 | Summary(pl.UTF-8): Statyczna wersja wrappera cpp dla popplera | |
141 | Group: Development/Libraries | |
142 | Requires: %{name}-cpp-devel = %{version}-%{release} | |
143 | ||
144 | %description cpp-static | |
145 | Static version of cpp wrapper for poppler. | |
146 | ||
147 | %description cpp-static -l pl.UTF-8 | |
148 | Statyczna wersja wrappera cpp dla popplera. | |
149 | ||
c858408d JB |
150 | %package glib |
151 | Summary: GLib wrapper for poppler | |
ef9a130a | 152 | Summary(pl.UTF-8): Wrapper GLib dla popplera |
c858408d JB |
153 | Group: Libraries |
154 | Requires: %{name} = %{version}-%{release} | |
59f6d029 | 155 | %{?with_cairo:Requires: cairo >= %{cairo_ver}} |
d80ed3f3 | 156 | Requires: glib2 >= 1:2.41 |
c858408d JB |
157 | |
158 | %description glib | |
159 | GLib wrapper for poppler. | |
160 | ||
4d968103 | 161 | %description glib -l pl.UTF-8 |
c858408d JB |
162 | Wrapper GLib dla popplera. |
163 | ||
164 | %package glib-devel | |
165 | Summary: Header files for GLib wrapper for poppler | |
ef9a130a | 166 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera GLib dla popplera |
c858408d JB |
167 | Group: Development/Libraries |
168 | Requires: %{name}-devel = %{version}-%{release} | |
169 | Requires: %{name}-glib = %{version}-%{release} | |
59f6d029 | 170 | %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}} |
d80ed3f3 | 171 | Requires: glib2-devel >= 1:2.41 |
c858408d JB |
172 | |
173 | %description glib-devel | |
174 | Header files for GLib wrapper for poppler. | |
175 | ||
4d968103 JR |
176 | %description glib-devel -l pl.UTF-8 |
177 | Pliki nagłówkowe wrappera GLib dla popplera. | |
c858408d | 178 | |
fbf0c290 JP |
179 | %package glib-static |
180 | Summary: Static version of GLib wrapper for poppler | |
181 | Summary(pl.UTF-8): Statyczna wersja wrappera GLib dla popplera | |
182 | Group: Development/Libraries | |
183 | Requires: %{name}-glib-devel = %{version}-%{release} | |
184 | ||
185 | %description glib-static | |
186 | Static version of GLib wrapper for poppler. | |
187 | ||
188 | %description glib-static -l pl.UTF-8 | |
189 | Statyczna wersja wrappera GLib dla popplera. | |
3ed2c139 | 190 | |
bc4f318c JB |
191 | %package qt5 |
192 | Summary: Qt5 wrapper for poppler | |
193 | Summary(pl.UTF-8): Wrapper Qt5 dla popplera | |
194 | Group: Libraries | |
195 | Requires: %{name} = %{version}-%{release} | |
196 | ||
197 | %description qt5 | |
198 | Qt5 wrapper for poppler. | |
199 | ||
200 | %description qt5 -l pl.UTF-8 | |
201 | Wrapper Qt5 dla popplera. | |
202 | ||
203 | %package qt5-devel | |
204 | Summary: Header files for Qt5 wrapper for poppler | |
205 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt5 dla popplera | |
206 | Group: Development/Libraries | |
bc4f318c | 207 | Requires: %{name}-devel = %{version}-%{release} |
d735c4a7 | 208 | Requires: %{name}-qt5 = %{version}-%{release} |
7a448eaa JP |
209 | Requires: Qt5Core-devel >= %{qt5_ver} |
210 | Requires: Qt5Gui-devel >= %{qt5_ver} | |
211 | Requires: Qt5Widgets-devel >= %{qt5_ver} | |
212 | Requires: Qt5Xml-devel >= %{qt5_ver} | |
bc4f318c JB |
213 | |
214 | %description qt5-devel | |
215 | Header files for Qt5 wrapper for poppler. | |
216 | ||
217 | %description qt5-devel -l pl.UTF-8 | |
218 | Pliki nagłówkowe wrapper Qt5 dla popplera. | |
219 | ||
fbf0c290 JP |
220 | %package qt5-static |
221 | Summary: Static version of Qt5 wrapper for poppler | |
222 | Summary(pl.UTF-8): Statyczna wersja wrappera Qt5 dla popplera | |
223 | Group: Development/Libraries | |
224 | Requires: %{name}-qt5-devel = %{version}-%{release} | |
225 | ||
226 | %description qt5-static | |
227 | Static version of Qt5 wrapper for poppler. | |
228 | ||
229 | %description qt5-static -l pl.UTF-8 | |
230 | Statyczna wersja wrappera Qt5 dla popplera. | |
231 | ||
3085c5f7 | 232 | %package progs |
6d515f80 | 233 | Summary: Set of tools for viewing information and converting PDF files |
ef9a130a | 234 | Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF |
6d515f80 | 235 | Group: Applications/Publishing |
6d515f80 | 236 | Provides: pdftops |
237 | Obsoletes: pdftohtml | |
238 | Obsoletes: pdftohtml-pdftops | |
5ba7dac4 | 239 | Obsoletes: poppler-utils |
9148ca80 | 240 | Obsoletes: xpdf-tools |
6d515f80 | 241 | |
3085c5f7 | 242 | %description progs |
4be74f1d | 243 | Package contains utilites for PDF files. These utilities allow to |
bd2cd4db TP |
244 | - extract information about PDF files, |
245 | - extract images from PDF files, | |
246 | - convert PDF files to HTML, plain text and PS formats. | |
6d515f80 | 247 | |
4d968103 | 248 | %description progs -l pl.UTF-8 |
9117833e | 249 | Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają |
bd2cd4db TP |
250 | - wyświetlanie informacji o plikach PDF, |
251 | - wydobywanie obrazków z plików PDF, | |
2ddaee26 | 252 | - konwersję plików PDF do formatów takich jak HTML, PS czy też |
bd2cd4db | 253 | czystego tekstu. |
6d515f80 | 254 | |
9e116569 | 255 | %prep |
256 | %setup -q | |
385007c9 | 257 | %patch0 -p1 |
59f6d029 | 258 | |
9e116569 | 259 | %build |
385007c9 JP |
260 | install -d build |
261 | cd build | |
262 | %cmake .. \ | |
385007c9 JP |
263 | %{!?with_cpp:-DENABLE_CPP=OFF} \ |
264 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
e54781b3 JB |
265 | %{?with_apidocs:-DENABLE_GTK_DOC=ON} \ |
266 | -DENABLE_GTK_TESTS=OFF \ | |
267 | -DENABLE_LIBCURL=ON \ | |
385007c9 | 268 | %{!?with_qt5:-DENABLE_QT5=OFF} \ |
e54781b3 JB |
269 | -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ |
270 | -DENABLE_ZLIB=ON \ | |
271 | %{!?with_cairo:-DWITH_CAIRO=OFF} | |
385007c9 JP |
272 | |
273 | %{__make} | |
274 | cd .. | |
275 | ||
276 | install -d build-static | |
277 | cd build-static | |
278 | %cmake .. \ | |
279 | -DBUILD_SHARED_LIBS=OFF \ | |
385007c9 JP |
280 | %{!?with_cpp:-DENABLE_CPP=OFF} \ |
281 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
e54781b3 JB |
282 | -DENABLE_GTK_DOC=OFF \ |
283 | -DENABLE_GTK_TESTS=OFF \ | |
284 | -DENABLE_LIBCURL=ON \ | |
385007c9 | 285 | %{!?with_qt5:-DENABLE_QT5=OFF} \ |
e54781b3 JB |
286 | -DENABLE_ZLIB=ON \ |
287 | %{!?with_cairo:-DWITH_CAIRO=OFF} | |
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.*.*.* |
e54781b3 | 319 | %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.86 |
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 | |
bc4f318c JB |
380 | %if %{with qt5} |
381 | %files qt5 | |
382 | %defattr(644,root,root,755) | |
383 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.* | |
384 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1 | |
385 | ||
386 | %files qt5-devel | |
387 | %defattr(644,root,root,755) | |
388 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so | |
389 | %{_includedir}/poppler/qt5 | |
390 | %{_pkgconfigdir}/poppler-qt5.pc | |
fbf0c290 JP |
391 | |
392 | %files qt5-static | |
393 | %defattr(644,root,root,755) | |
394 | %{_libdir}/libpoppler-qt5.a | |
a7573488 | 395 | %endif |
bc4f318c | 396 | |
3085c5f7 | 397 | %files progs |
6d515f80 | 398 | %defattr(644,root,root,755) |
e54781b3 | 399 | %attr(755,root,root) %{_bindir}/pdfattach |
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 | |
e54781b3 | 412 | %{_mandir}/man1/pdfattach.1* |
6d74da5a JB |
413 | %{_mandir}/man1/pdfdetach.1* |
414 | %{_mandir}/man1/pdffonts.1* | |
415 | %{_mandir}/man1/pdfimages.1* | |
416 | %{_mandir}/man1/pdfinfo.1* | |
417 | %{_mandir}/man1/pdfseparate.1* | |
418 | %{_mandir}/man1/pdfsig.1* | |
419 | %{_mandir}/man1/pdftocairo.1* | |
420 | %{_mandir}/man1/pdftohtml.1* | |
421 | %{_mandir}/man1/pdftoppm.1* | |
422 | %{_mandir}/man1/pdftops.1* | |
423 | %{_mandir}/man1/pdftotext.1* | |
424 | %{_mandir}/man1/pdfunite.1* |