]>
Commit | Line | Data |
---|---|---|
75fd4c8d | 1 | # TODO: qt5 port (BR: Qt5Core, Qt5Gui, Qt5Xml, Qt5Widgets, Qt5Test >= 5.0.0) |
59f6d029 | 2 | # |
708b49cb | 3 | # Conditional build: |
8d5d1be9 | 4 | %bcond_without apidocs # disable gtk-doc |
7122799d | 5 | %bcond_without cairo # disable Cairo backend |
59f6d029 | 6 | %bcond_without qt4 # disable qt4 wrapper |
931ab1e2 | 7 | %bcond_without cpp # disable cpp wrapper |
cfe3ca2f | 8 | %bcond_without glib # disable glib wrapper |
708b49cb | 9 | # |
a6475984 | 10 | %define cairo_ver 1.10.0 |
e2a6dd23 | 11 | # |
9e116569 | 12 | Summary: PDF rendering library |
ef9a130a | 13 | Summary(pl.UTF-8): Biblioteka renderująca PDF |
9e116569 | 14 | Name: poppler |
9f2531f5 | 15 | Version: 0.24.4 |
10069889 | 16 | Release: 1 |
434ea14d | 17 | License: GPL v2+ |
9e116569 | 18 | Group: Libraries |
75fd4c8d | 19 | Source0: http://poppler.freedesktop.org/%{name}-%{version}.tar.xz |
9f2531f5 | 20 | # Source0-md5: 2da22b966cf7a2f8da5bf021e68188ce |
9e116569 | 21 | URL: http://poppler.freedesktop.org/ |
d84a04fd JB |
22 | %{?with_qt4:BuildRequires: QtGui-devel >= 4.4.0} |
23 | %{?with_qt4:BuildRequires: QtTest-devel >= 4.4.0} | |
24 | %{?with_qt4:BuildRequires: QtXml-devel >= 4.4.0} | |
7e0143fb JB |
25 | BuildRequires: autoconf >= 2.59 |
26 | BuildRequires: automake | |
e2a6dd23 | 27 | %{?with_cairo:BuildRequires: cairo-devel >= %{cairo_ver}} |
bd2cd4db | 28 | BuildRequires: curl-devel |
ea3f193d | 29 | BuildRequires: docbook-dtd412-xml |
d84a04fd | 30 | BuildRequires: fontconfig-devel >= 2.0.0 |
708b49cb | 31 | BuildRequires: freetype-devel >= 2.0 |
2b8c2f20 | 32 | BuildRequires: gettext-devel |
161e58e8 | 33 | %{?with_glib:BuildRequires: glib2-devel >= 1:2.18.0} |
a6475984 JB |
34 | BuildRequires: gobject-introspection-devel >= 0.6.7 |
35 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.14} | |
aa82c819 | 36 | BuildRequires: lcms2-devel |
9e1eea06 | 37 | BuildRequires: libjpeg-devel |
d9c2dc15 | 38 | BuildRequires: libpng-devel |
708b49cb | 39 | BuildRequires: libstdc++-devel |
d9c2dc15 | 40 | BuildRequires: libtiff-devel |
7e0143fb | 41 | BuildRequires: libtool >= 2:1.5 |
9148ca80 | 42 | BuildRequires: libxml2-devel >= 2.0 |
5ee7d9e8 | 43 | BuildRequires: openjpeg-devel >= 1.5 |
a6475984 | 44 | BuildRequires: pkgconfig >= 1:0.18 |
5ee7d9e8 JB |
45 | # wanted cairo backends |
46 | BuildRequires: pkgconfig(cairo-pdf) >= %{cairo_ver} | |
47 | BuildRequires: pkgconfig(cairo-ps) >= %{cairo_ver} | |
48 | BuildRequires: pkgconfig(cairo-svg) >= %{cairo_ver} | |
9148ca80 | 49 | %{?with_qt4:BuildRequires: qt4-build} |
21021625 | 50 | BuildRequires: sed >= 4.0 |
9542becb | 51 | BuildRequires: which |
75fd4c8d JB |
52 | BuildRequires: tar >= 1:1.22 |
53 | BuildRequires: xz | |
bf5184f7 | 54 | BuildRequires: zlib-devel |
5ee7d9e8 | 55 | Requires: openjpeg >= 1.5 |
9e116569 | 56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
57 | ||
58 | %description | |
256ec317 | 59 | A common PDF rendering library for integrating PDF viewing into |
60 | desktop applications (based on the xpdf-3.0 code base). | |
9e116569 | 61 | |
4d968103 JR |
62 | %description -l pl.UTF-8 |
63 | Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w | |
943507a4 JB |
64 | aplikacjach desktopowych (oparta na kodzie xpdf-3.0). |
65 | ||
9e116569 | 66 | %package devel |
943507a4 | 67 | Summary: Poppler header files |
ef9a130a | 68 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler |
9e116569 | 69 | Group: Development/Libraries |
70 | Requires: %{name} = %{version}-%{release} | |
d9c2dc15 | 71 | Requires: curl-devel |
d84a04fd | 72 | Requires: fontconfig-devel >= 2.0.0 |
708b49cb | 73 | Requires: freetype-devel >= 2.0 |
aa82c819 | 74 | Requires: lcms2-devel |
d9c2dc15 JB |
75 | Requires: libjpeg-devel |
76 | Requires: libpng-devel | |
708b49cb | 77 | Requires: libstdc++-devel |
d9c2dc15 | 78 | Requires: libtiff-devel |
5ee7d9e8 | 79 | Requires: openjpeg-devel >= 1.5 |
d9c2dc15 | 80 | Requires: zlib-devel |
9e116569 | 81 | |
82 | %description devel | |
943507a4 JB |
83 | Header files for the Poppler library. |
84 | ||
4d968103 JR |
85 | %description devel -l pl.UTF-8 |
86 | Pliki nagłówkowe biblioteki Poppler. | |
9e116569 | 87 | |
88 | %package static | |
89 | Summary: Poppler static libraries | |
ef9a130a | 90 | Summary(pl.UTF-8): Statyczne biblioteki Poppler |
9e116569 | 91 | Group: Development/Libraries |
92 | Requires: %{name}-devel = %{version}-%{release} | |
93 | ||
94 | %description static | |
95 | Poppler static libraries. | |
96 | ||
4d968103 | 97 | %description static -l pl.UTF-8 |
943507a4 JB |
98 | Statyczne biblioteki Poppler. |
99 | ||
356581a6 MB |
100 | %package apidocs |
101 | Summary: Poppler library API documentation | |
102 | Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler | |
103 | Group: Documentation | |
104 | Requires: gtk-doc-common | |
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 | ||
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}} |
d84a04fd | 155 | Requires: glib2 >= 1:2.18.0 |
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}} |
d84a04fd | 170 | Requires: glib2-devel >= 1:2.18.0 |
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 JB |
177 | |
178 | %package glib-static | |
179 | Summary: Static version of GLib wrapper for poppler | |
ef9a130a | 180 | Summary(pl.UTF-8): Statyczna wersja wrappera GLib dla popplera |
c858408d JB |
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 | ||
4d968103 | 187 | %description glib-static -l pl.UTF-8 |
c858408d JB |
188 | Statyczna wersja wrappera GLib dla popplera. |
189 | ||
3ed2c139 PS |
190 | %package Qt |
191 | Summary: Qt4 wrapper for poppler | |
ef9a130a | 192 | Summary(pl.UTF-8): Wrapper Qt4 dla popplera |
3ed2c139 PS |
193 | Group: Libraries |
194 | Requires: %{name} = %{version}-%{release} | |
d84a04fd JB |
195 | Requires: QtGui >= 4.4.0 |
196 | Requires: QtXml >= 4.4.0 | |
d9c2dc15 | 197 | Obsoletes: poppler-qt |
3ed2c139 PS |
198 | |
199 | %description Qt | |
200 | Qt4 wrapper for poppler. | |
201 | ||
4d968103 | 202 | %description Qt -l pl.UTF-8 |
3ed2c139 PS |
203 | Wrapper Qt4 dla popplera. |
204 | ||
205 | %package Qt-devel | |
206 | Summary: Header files for Qt4 wrapper for poppler | |
ef9a130a | 207 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt4 dla popplera |
3ed2c139 | 208 | Group: Development/Libraries |
3ed2c139 | 209 | Requires: %{name}-Qt = %{version}-%{release} |
9148ca80 | 210 | Requires: %{name}-devel = %{version}-%{release} |
d84a04fd JB |
211 | Requires: QtGui-devel >= 4.4.0 |
212 | Requires: QtXml-devel >= 4.4.0 | |
d9c2dc15 | 213 | Obsoletes: poppler-qt-devel |
3ed2c139 PS |
214 | |
215 | %description Qt-devel | |
216 | Header files for Qt4 wrapper for poppler. | |
217 | ||
4d968103 JR |
218 | %description Qt-devel -l pl.UTF-8 |
219 | Pliki nagłówkowe wrapper Qt4 dla popplera. | |
3ed2c139 PS |
220 | |
221 | %package Qt-static | |
222 | Summary: Static version of Qt4 wrapper for poppler | |
ef9a130a | 223 | Summary(pl.UTF-8): Statyczna wersja wrappera Qt4 dla popplera |
3ed2c139 PS |
224 | Group: Development/Libraries |
225 | Requires: %{name}-Qt-devel = %{version}-%{release} | |
d9c2dc15 | 226 | Obsoletes: poppler-qt-static |
3ed2c139 PS |
227 | |
228 | %description Qt-static | |
229 | Static version of Qt4 wrapper for poppler. | |
230 | ||
4d968103 | 231 | %description Qt-static -l pl.UTF-8 |
3ed2c139 PS |
232 | Statyczna wersja wrappera Qt4 dla popplera. |
233 | ||
3085c5f7 | 234 | %package progs |
6d515f80 | 235 | Summary: Set of tools for viewing information and converting PDF files |
ef9a130a | 236 | Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF |
6d515f80 | 237 | Group: Applications/Publishing |
6d515f80 | 238 | Provides: pdftops |
239 | Obsoletes: pdftohtml | |
240 | Obsoletes: pdftohtml-pdftops | |
5ba7dac4 | 241 | Obsoletes: poppler-utils |
9148ca80 | 242 | Obsoletes: xpdf-tools |
6d515f80 | 243 | |
3085c5f7 | 244 | %description progs |
4be74f1d | 245 | Package contains utilites for PDF files. These utilities allow to |
bd2cd4db TP |
246 | - extract information about PDF files, |
247 | - extract images from PDF files, | |
248 | - convert PDF files to HTML, plain text and PS formats. | |
6d515f80 | 249 | |
4d968103 | 250 | %description progs -l pl.UTF-8 |
9117833e | 251 | Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają |
bd2cd4db TP |
252 | - wyświetlanie informacji o plikach PDF, |
253 | - wydobywanie obrazków z plików PDF, | |
2ddaee26 | 254 | - konwersję plików PDF do formatów takich jak HTML, PS czy też |
bd2cd4db | 255 | czystego tekstu. |
6d515f80 | 256 | |
9e116569 | 257 | %prep |
258 | %setup -q | |
59f6d029 | 259 | |
9e116569 | 260 | %build |
13fe12a3 | 261 | %{?with_apidocs:%{__gtkdocize}} |
7e0143fb | 262 | %{__libtoolize} |
6d515f80 | 263 | %{__aclocal} -I m4 |
b9e0e47d | 264 | %{__autoconf} -f |
7e0143fb JB |
265 | %{__autoheader} |
266 | %{__automake} | |
943507a4 | 267 | %configure \ |
c1800e6e | 268 | MOCQT4=/usr/bin/moc-qt4 \ |
5b64d6c1 | 269 | --disable-gtk-test \ |
bd2cd4db TP |
270 | --enable-libcurl \ |
271 | %{?with_apidocs:--enable-gtk-doc} \ | |
7e0143fb | 272 | %{!?with_cairo:--disable-cairo-output} \ |
931ab1e2 | 273 | %{!?with_cpp:--disable-poppler-cpp} \ |
cfe3ca2f | 274 | %{!?with_glib:--disable-poppler-glib} \ |
bd2cd4db | 275 | %{!?with_qt4:--disable-poppler-qt4} \ |
d84a04fd | 276 | --disable-silent-rules \ |
30316221 | 277 | --enable-xpdf-headers \ |
bf5184f7 | 278 | --enable-zlib \ |
8d5d1be9 | 279 | --enable-dependency-tracking \ |
5d1986fc | 280 | --with-html-dir=%{_gtkdocdir} |
9148ca80 | 281 | |
9e116569 | 282 | %{__make} |
283 | ||
284 | %install | |
285 | rm -rf $RPM_BUILD_ROOT | |
286 | ||
287 | %{__make} install \ | |
288 | DESTDIR=$RPM_BUILD_ROOT | |
289 | ||
9148ca80 ER |
290 | %if %{without apidocs} |
291 | # why it still installs them, brr | |
fb471923 | 292 | %{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/poppler || : |
9148ca80 ER |
293 | %endif |
294 | ||
797490cf AF |
295 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
296 | ||
9e116569 | 297 | %clean |
298 | rm -rf $RPM_BUILD_ROOT | |
299 | ||
943507a4 JB |
300 | %post -p /sbin/ldconfig |
301 | %postun -p /sbin/ldconfig | |
9e116569 | 302 | |
d84a04fd JB |
303 | %post cpp -p /sbin/ldconfig |
304 | %postun cpp -p /sbin/ldconfig | |
305 | ||
c858408d JB |
306 | %post glib -p /sbin/ldconfig |
307 | %postun glib -p /sbin/ldconfig | |
308 | ||
dff19bfc PS |
309 | %post Qt -p /sbin/ldconfig |
310 | %postun Qt -p /sbin/ldconfig | |
311 | ||
9e116569 | 312 | %files |
313 | %defattr(644,root,root,755) | |
314 | %doc AUTHORS ChangeLog NEWS README* TODO | |
c858408d | 315 | %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.* |
9f2531f5 | 316 | %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.44 |
9e116569 | 317 | |
318 | %files devel | |
319 | %defattr(644,root,root,755) | |
c858408d | 320 | %attr(755,root,root) %{_libdir}/libpoppler.so |
9e1eea06 JB |
321 | %dir %{_includedir}/poppler |
322 | %{_includedir}/poppler/poppler-config.h | |
35d1caed | 323 | %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h |
40c95880 | 324 | %{_includedir}/poppler/fofi |
d84a04fd | 325 | %{_includedir}/poppler/goo |
9e1eea06 | 326 | %{_includedir}/poppler/splash |
c858408d JB |
327 | %{_pkgconfigdir}/poppler.pc |
328 | %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc} | |
329 | %{_pkgconfigdir}/poppler-splash.pc | |
9e116569 | 330 | |
331 | %files static | |
332 | %defattr(644,root,root,755) | |
c858408d JB |
333 | %{_libdir}/libpoppler.a |
334 | ||
356581a6 MB |
335 | %if %{with apidocs} |
336 | %files apidocs | |
337 | %defattr(644,root,root,755) | |
338 | %{_gtkdocdir}/poppler | |
339 | %endif | |
340 | ||
cfe3ca2f | 341 | %if %{with cpp} |
931ab1e2 | 342 | %files cpp |
343 | %defattr(644,root,root,755) | |
344 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.* | |
345 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0 | |
346 | ||
347 | %files cpp-devel | |
348 | %defattr(644,root,root,755) | |
349 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so | |
931ab1e2 | 350 | %{_includedir}/poppler/cpp |
351 | %{_pkgconfigdir}/poppler-cpp.pc | |
352 | ||
353 | %files cpp-static | |
354 | %defattr(644,root,root,755) | |
355 | %{_libdir}/libpoppler-cpp.a | |
cfe3ca2f | 356 | %endif |
931ab1e2 | 357 | |
cfe3ca2f | 358 | %if %{with glib} |
c858408d JB |
359 | %files glib |
360 | %defattr(644,root,root,755) | |
361 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.* | |
35d1caed AM |
362 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8 |
363 | %{_libdir}/girepository-1.0/Poppler-0.18.typelib | |
c858408d JB |
364 | |
365 | %files glib-devel | |
366 | %defattr(644,root,root,755) | |
367 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so | |
c858408d JB |
368 | %{_includedir}/poppler/glib |
369 | %{_pkgconfigdir}/poppler-glib.pc | |
35d1caed | 370 | %{_datadir}/gir-1.0/Poppler-0.18.gir |
c858408d JB |
371 | |
372 | %files glib-static | |
373 | %defattr(644,root,root,755) | |
374 | %{_libdir}/libpoppler-glib.a | |
cfe3ca2f | 375 | %endif |
c858408d | 376 | |
3ed2c139 PS |
377 | %if %{with qt4} |
378 | %files Qt | |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_libdir}/libpoppler-qt4.so.*.*.* | |
aa82c819 | 381 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt4.so.4 |
3ed2c139 PS |
382 | |
383 | %files Qt-devel | |
384 | %defattr(644,root,root,755) | |
385 | %attr(755,root,root) %{_libdir}/libpoppler-qt4.so | |
9e1eea06 | 386 | %{_includedir}/poppler/qt4 |
3ed2c139 PS |
387 | %{_pkgconfigdir}/poppler-qt4.pc |
388 | ||
389 | %files Qt-static | |
390 | %defattr(644,root,root,755) | |
391 | %{_libdir}/libpoppler-qt4.a | |
392 | %endif | |
393 | ||
3085c5f7 | 394 | %files progs |
6d515f80 | 395 | %defattr(644,root,root,755) |
396 | %attr(755,root,root) %{_bindir}/pdf* | |
397 | %{_mandir}/man1/pdf* |