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