]>
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 |
385007c9 | 14 | Version: 0.62.0 |
213ba3ea | 15 | Release: 1.1 |
434ea14d | 16 | License: GPL v2+ |
9e116569 | 17 | Group: Libraries |
c32fd9f2 | 18 | Source0: https://poppler.freedesktop.org/%{name}-%{version}.tar.xz |
385007c9 JP |
19 | # Source0-md5: 42b801f2defaccb6b6cf1bf783ee1552 |
20 | Patch0: %{name}-gtkdocdir.patch | |
3ae1ae12 | 21 | Patch1: %{name}-gtkdoc1_27.patch |
c32fd9f2 | 22 | URL: https://poppler.freedesktop.org/ |
7a448eaa JP |
23 | %{?with_qt5:BuildRequires: Qt5Core-devel >= %{qt5_ver}} |
24 | %{?with_qt5:BuildRequires: Qt5Gui-devel >= %{qt5_ver}} | |
25 | %{?with_qt5:BuildRequires: Qt5Test-devel >= %{qt5_ver}} | |
26 | %{?with_qt5:BuildRequires: Qt5Widgets-devel >= %{qt5_ver}} | |
27 | %{?with_qt5:BuildRequires: Qt5Xml-devel >= %{qt5_ver}} | |
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} |
385007c9 | 36 | 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 |
5316425b | 41 | BuildRequires: libstdc++-devel >= 6:4.7 |
d9c2dc15 | 42 | BuildRequires: libtiff-devel |
9148ca80 | 43 | BuildRequires: libxml2-devel >= 2.0 |
c32fd9f2 | 44 | BuildRequires: nss-devel >= 3 |
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 JP |
58 | Obsoletes: poppler-cpp-static |
59 | Obsoletes: poppler-glib-static | |
60 | Obsoletes: poppler-qt4 | |
61 | Obsoletes: poppler-qt4-devel | |
62 | Obsoletes: poppler-qt4-static | |
63 | Obsoletes: poppler-qt5-static | |
9e116569 | 64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65 | ||
66 | %description | |
256ec317 | 67 | A common PDF rendering library for integrating PDF viewing into |
68 | desktop applications (based on the xpdf-3.0 code base). | |
9e116569 | 69 | |
4d968103 JR |
70 | %description -l pl.UTF-8 |
71 | Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w | |
943507a4 JB |
72 | aplikacjach desktopowych (oparta na kodzie xpdf-3.0). |
73 | ||
9e116569 | 74 | %package devel |
943507a4 | 75 | Summary: Poppler header files |
ef9a130a | 76 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler |
9e116569 | 77 | Group: Development/Libraries |
78 | Requires: %{name} = %{version}-%{release} | |
d9c2dc15 | 79 | Requires: curl-devel |
3d571130 | 80 | Requires: lcms2-devel >= 2 |
5316425b | 81 | Requires: libstdc++-devel >= 6:4.7 |
c32fd9f2 | 82 | Requires: nss-devel >= 3 |
9e116569 | 83 | |
84 | %description devel | |
943507a4 JB |
85 | Header files for the Poppler library. |
86 | ||
4d968103 JR |
87 | %description devel -l pl.UTF-8 |
88 | Pliki nagłówkowe biblioteki Poppler. | |
9e116569 | 89 | |
90 | %package static | |
91 | Summary: Poppler static libraries | |
ef9a130a | 92 | Summary(pl.UTF-8): Statyczne biblioteki Poppler |
9e116569 | 93 | Group: Development/Libraries |
94 | Requires: %{name}-devel = %{version}-%{release} | |
95 | ||
96 | %description static | |
97 | Poppler static libraries. | |
98 | ||
4d968103 | 99 | %description static -l pl.UTF-8 |
943507a4 JB |
100 | Statyczne biblioteki Poppler. |
101 | ||
356581a6 MB |
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 | |
d735c4a7 ER |
107 | %if "%{_rpmversion}" >= "5" |
108 | BuildArch: noarch | |
109 | %endif | |
356581a6 MB |
110 | |
111 | %description apidocs | |
112 | Poppler library API documentation. | |
113 | ||
114 | %description apidocs -l pl.UTF-8 | |
115 | Dokumentacja API biblioteki Poppler. | |
116 | ||
931ab1e2 | 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 | ||
c858408d JB |
142 | %package glib |
143 | Summary: GLib wrapper for poppler | |
ef9a130a | 144 | Summary(pl.UTF-8): Wrapper GLib dla popplera |
c858408d JB |
145 | Group: Libraries |
146 | Requires: %{name} = %{version}-%{release} | |
59f6d029 | 147 | %{?with_cairo:Requires: cairo >= %{cairo_ver}} |
d80ed3f3 | 148 | Requires: glib2 >= 1:2.41 |
c858408d JB |
149 | |
150 | %description glib | |
151 | GLib wrapper for poppler. | |
152 | ||
4d968103 | 153 | %description glib -l pl.UTF-8 |
c858408d JB |
154 | Wrapper GLib dla popplera. |
155 | ||
156 | %package glib-devel | |
157 | Summary: Header files for GLib wrapper for poppler | |
ef9a130a | 158 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera GLib dla popplera |
c858408d JB |
159 | Group: Development/Libraries |
160 | Requires: %{name}-devel = %{version}-%{release} | |
161 | Requires: %{name}-glib = %{version}-%{release} | |
59f6d029 | 162 | %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}} |
d80ed3f3 | 163 | Requires: glib2-devel >= 1:2.41 |
c858408d JB |
164 | |
165 | %description glib-devel | |
166 | Header files for GLib wrapper for poppler. | |
167 | ||
4d968103 JR |
168 | %description glib-devel -l pl.UTF-8 |
169 | Pliki nagłówkowe wrappera GLib dla popplera. | |
c858408d | 170 | |
3ed2c139 | 171 | |
bc4f318c JB |
172 | %package qt5 |
173 | Summary: Qt5 wrapper for poppler | |
174 | Summary(pl.UTF-8): Wrapper Qt5 dla popplera | |
175 | Group: Libraries | |
176 | Requires: %{name} = %{version}-%{release} | |
177 | ||
178 | %description qt5 | |
179 | Qt5 wrapper for poppler. | |
180 | ||
181 | %description qt5 -l pl.UTF-8 | |
182 | Wrapper Qt5 dla popplera. | |
183 | ||
184 | %package qt5-devel | |
185 | Summary: Header files for Qt5 wrapper for poppler | |
186 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt5 dla popplera | |
187 | Group: Development/Libraries | |
bc4f318c | 188 | Requires: %{name}-devel = %{version}-%{release} |
d735c4a7 | 189 | Requires: %{name}-qt5 = %{version}-%{release} |
7a448eaa JP |
190 | Requires: Qt5Core-devel >= %{qt5_ver} |
191 | Requires: Qt5Gui-devel >= %{qt5_ver} | |
192 | Requires: Qt5Widgets-devel >= %{qt5_ver} | |
193 | Requires: Qt5Xml-devel >= %{qt5_ver} | |
bc4f318c JB |
194 | |
195 | %description qt5-devel | |
196 | Header files for Qt5 wrapper for poppler. | |
197 | ||
198 | %description qt5-devel -l pl.UTF-8 | |
199 | Pliki nagłówkowe wrapper Qt5 dla popplera. | |
200 | ||
3085c5f7 | 201 | %package progs |
6d515f80 | 202 | Summary: Set of tools for viewing information and converting PDF files |
ef9a130a | 203 | Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF |
6d515f80 | 204 | Group: Applications/Publishing |
6d515f80 | 205 | Provides: pdftops |
206 | Obsoletes: pdftohtml | |
207 | Obsoletes: pdftohtml-pdftops | |
5ba7dac4 | 208 | Obsoletes: poppler-utils |
9148ca80 | 209 | Obsoletes: xpdf-tools |
6d515f80 | 210 | |
3085c5f7 | 211 | %description progs |
4be74f1d | 212 | Package contains utilites for PDF files. These utilities allow to |
bd2cd4db TP |
213 | - extract information about PDF files, |
214 | - extract images from PDF files, | |
215 | - convert PDF files to HTML, plain text and PS formats. | |
6d515f80 | 216 | |
4d968103 | 217 | %description progs -l pl.UTF-8 |
9117833e | 218 | Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają |
bd2cd4db TP |
219 | - wyświetlanie informacji o plikach PDF, |
220 | - wydobywanie obrazków z plików PDF, | |
2ddaee26 | 221 | - konwersję plików PDF do formatów takich jak HTML, PS czy też |
bd2cd4db | 222 | czystego tekstu. |
6d515f80 | 223 | |
9e116569 | 224 | %prep |
225 | %setup -q | |
385007c9 | 226 | %patch0 -p1 |
3ae1ae12 | 227 | %patch1 -p1 |
59f6d029 | 228 | |
9e116569 | 229 | %build |
385007c9 JP |
230 | install -d build |
231 | cd build | |
232 | %cmake .. \ | |
233 | -DENABLE_GTK_TESTS=OFF \ | |
234 | -DENABLE_LIBCURL=ON \ | |
235 | %{?with_apidocs:-DENABLE_GTK_DOC=ON} \ | |
236 | %{!?with_cairo:-DWITH_CAIRO=OFF} \ | |
237 | %{!?with_cpp:-DENABLE_CPP=OFF} \ | |
238 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
239 | %{!?with_qt5:-DENABLE_QT5=OFF} \ | |
240 | -DENABLE_XPDF_HEADERS=ON \ | |
241 | -DENABLE_ZLIB=ON | |
242 | ||
243 | %{__make} | |
244 | cd .. | |
245 | ||
246 | install -d build-static | |
247 | cd build-static | |
248 | %cmake .. \ | |
249 | -DBUILD_SHARED_LIBS=OFF \ | |
250 | -DENABLE_GTK_TESTS=OFF \ | |
251 | -DENABLE_LIBCURL=ON \ | |
252 | %{?with_apidocs:-DENABLE_GTK_DOC=ON} \ | |
253 | %{!?with_cairo:-DWITH_CAIRO=OFF} \ | |
254 | %{!?with_cpp:-DENABLE_CPP=OFF} \ | |
255 | %{!?with_glib:-DENABLE_GLIB=OFF} \ | |
256 | %{!?with_qt5:-DENABLE_QT5=OFF} \ | |
257 | -DENABLE_XPDF_HEADERS=ON \ | |
258 | -DENABLE_ZLIB=ON | |
9148ca80 | 259 | |
9e116569 | 260 | %{__make} |
261 | ||
262 | %install | |
263 | rm -rf $RPM_BUILD_ROOT | |
264 | ||
385007c9 | 265 | %{__make} -C build-static install \ |
9e116569 | 266 | DESTDIR=$RPM_BUILD_ROOT |
267 | ||
385007c9 JP |
268 | %{__make} -C build install \ |
269 | DESTDIR=$RPM_BUILD_ROOT | |
797490cf | 270 | |
9e116569 | 271 | %clean |
272 | rm -rf $RPM_BUILD_ROOT | |
273 | ||
943507a4 JB |
274 | %post -p /sbin/ldconfig |
275 | %postun -p /sbin/ldconfig | |
9e116569 | 276 | |
d84a04fd JB |
277 | %post cpp -p /sbin/ldconfig |
278 | %postun cpp -p /sbin/ldconfig | |
279 | ||
c858408d JB |
280 | %post glib -p /sbin/ldconfig |
281 | %postun glib -p /sbin/ldconfig | |
282 | ||
bc4f318c JB |
283 | %post qt5 -p /sbin/ldconfig |
284 | %postun qt5 -p /sbin/ldconfig | |
dff19bfc | 285 | |
9e116569 | 286 | %files |
287 | %defattr(644,root,root,755) | |
385007c9 | 288 | %doc AUTHORS ChangeLog NEWS README* |
c858408d | 289 | %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.* |
385007c9 | 290 | %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.73 |
9e116569 | 291 | |
292 | %files devel | |
293 | %defattr(644,root,root,755) | |
c858408d | 294 | %attr(755,root,root) %{_libdir}/libpoppler.so |
9e1eea06 JB |
295 | %dir %{_includedir}/poppler |
296 | %{_includedir}/poppler/poppler-config.h | |
35d1caed | 297 | %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h |
40c95880 | 298 | %{_includedir}/poppler/fofi |
d84a04fd | 299 | %{_includedir}/poppler/goo |
9e1eea06 | 300 | %{_includedir}/poppler/splash |
c858408d JB |
301 | %{_pkgconfigdir}/poppler.pc |
302 | %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc} | |
303 | %{_pkgconfigdir}/poppler-splash.pc | |
9e116569 | 304 | |
305 | %files static | |
306 | %defattr(644,root,root,755) | |
c858408d JB |
307 | %{_libdir}/libpoppler.a |
308 | ||
356581a6 MB |
309 | %if %{with apidocs} |
310 | %files apidocs | |
311 | %defattr(644,root,root,755) | |
312 | %{_gtkdocdir}/poppler | |
313 | %endif | |
314 | ||
cfe3ca2f | 315 | %if %{with cpp} |
931ab1e2 | 316 | %files cpp |
317 | %defattr(644,root,root,755) | |
318 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.* | |
319 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0 | |
320 | ||
321 | %files cpp-devel | |
322 | %defattr(644,root,root,755) | |
323 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so | |
931ab1e2 | 324 | %{_includedir}/poppler/cpp |
325 | %{_pkgconfigdir}/poppler-cpp.pc | |
a7573488 | 326 | %endif |
931ab1e2 | 327 | |
cfe3ca2f | 328 | %if %{with glib} |
c858408d JB |
329 | %files glib |
330 | %defattr(644,root,root,755) | |
331 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.* | |
35d1caed AM |
332 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8 |
333 | %{_libdir}/girepository-1.0/Poppler-0.18.typelib | |
c858408d JB |
334 | |
335 | %files glib-devel | |
336 | %defattr(644,root,root,755) | |
337 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so | |
c858408d JB |
338 | %{_includedir}/poppler/glib |
339 | %{_pkgconfigdir}/poppler-glib.pc | |
35d1caed | 340 | %{_datadir}/gir-1.0/Poppler-0.18.gir |
a7573488 | 341 | %endif |
c858408d | 342 | |
bc4f318c JB |
343 | %if %{with qt5} |
344 | %files qt5 | |
345 | %defattr(644,root,root,755) | |
346 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.* | |
347 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1 | |
348 | ||
349 | %files qt5-devel | |
350 | %defattr(644,root,root,755) | |
351 | %attr(755,root,root) %{_libdir}/libpoppler-qt5.so | |
352 | %{_includedir}/poppler/qt5 | |
353 | %{_pkgconfigdir}/poppler-qt5.pc | |
a7573488 | 354 | %endif |
bc4f318c | 355 | |
3085c5f7 | 356 | %files progs |
6d515f80 | 357 | %defattr(644,root,root,755) |
6d74da5a JB |
358 | %attr(755,root,root) %{_bindir}/pdfdetach |
359 | %attr(755,root,root) %{_bindir}/pdffonts | |
360 | %attr(755,root,root) %{_bindir}/pdfimages | |
361 | %attr(755,root,root) %{_bindir}/pdfinfo | |
362 | %attr(755,root,root) %{_bindir}/pdfseparate | |
363 | %attr(755,root,root) %{_bindir}/pdfsig | |
364 | %attr(755,root,root) %{_bindir}/pdftocairo | |
365 | %attr(755,root,root) %{_bindir}/pdftohtml | |
366 | %attr(755,root,root) %{_bindir}/pdftoppm | |
367 | %attr(755,root,root) %{_bindir}/pdftops | |
368 | %attr(755,root,root) %{_bindir}/pdftotext | |
369 | %attr(755,root,root) %{_bindir}/pdfunite | |
370 | %{_mandir}/man1/pdfdetach.1* | |
371 | %{_mandir}/man1/pdffonts.1* | |
372 | %{_mandir}/man1/pdfimages.1* | |
373 | %{_mandir}/man1/pdfinfo.1* | |
374 | %{_mandir}/man1/pdfseparate.1* | |
375 | %{_mandir}/man1/pdfsig.1* | |
376 | %{_mandir}/man1/pdftocairo.1* | |
377 | %{_mandir}/man1/pdftohtml.1* | |
378 | %{_mandir}/man1/pdftoppm.1* | |
379 | %{_mandir}/man1/pdftops.1* | |
380 | %{_mandir}/man1/pdftotext.1* | |
381 | %{_mandir}/man1/pdfunite.1* |