]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # disable gtk-doc | |
4 | %bcond_without cairo # disable Cairo backend | |
5 | %bcond_without qt4 # disable qt4 wrapper | |
6 | %bcond_without cpp # disable cpp wrapper | |
7 | %bcond_without glib # disable glib wrapper | |
8 | # | |
9 | %define cairo_ver 1.10.0 | |
10 | # | |
11 | Summary: PDF rendering library | |
12 | Summary(pl.UTF-8): Biblioteka renderująca PDF | |
13 | Name: poppler | |
14 | Version: 0.20.0 | |
15 | Release: 1 | |
16 | License: GPL v2+ | |
17 | Group: Libraries | |
18 | Source0: http://poppler.freedesktop.org/%{name}-%{version}.tar.gz | |
19 | # Source0-md5: 5bca54b9561bf5b14d9344efce2cd4f3 | |
20 | URL: http://poppler.freedesktop.org/ | |
21 | %{?with_qt4:BuildRequires: QtGui-devel >= 4.4.0} | |
22 | %{?with_qt4:BuildRequires: QtTest-devel >= 4.4.0} | |
23 | %{?with_qt4:BuildRequires: QtXml-devel >= 4.4.0} | |
24 | BuildRequires: autoconf >= 2.59 | |
25 | BuildRequires: automake | |
26 | %{?with_cairo:BuildRequires: cairo-devel >= %{cairo_ver}} | |
27 | BuildRequires: curl-devel | |
28 | BuildRequires: docbook-dtd412-xml | |
29 | BuildRequires: fontconfig-devel >= 2.0.0 | |
30 | BuildRequires: freetype-devel >= 2.0 | |
31 | BuildRequires: gettext-devel | |
32 | %{?with_glib:BuildRequires: glib2-devel >= 1:2.18.0} | |
33 | BuildRequires: gobject-introspection-devel >= 0.6.7 | |
34 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.14} | |
35 | BuildRequires: lcms2-devel | |
36 | BuildRequires: libjpeg-devel | |
37 | BuildRequires: libpng-devel | |
38 | BuildRequires: libstdc++-devel | |
39 | BuildRequires: libtiff-devel | |
40 | BuildRequires: libtool >= 2:1.5 | |
41 | BuildRequires: libxml2-devel >= 2.0 | |
42 | BuildRequires: openjpeg-devel | |
43 | BuildRequires: pkgconfig >= 1:0.18 | |
44 | %{?with_qt4:BuildRequires: qt4-build} | |
45 | BuildRequires: sed >= 4.0 | |
46 | BuildRequires: which | |
47 | BuildRequires: zlib-devel | |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
51 | A common PDF rendering library for integrating PDF viewing into | |
52 | desktop applications (based on the xpdf-3.0 code base). | |
53 | ||
54 | %description -l pl.UTF-8 | |
55 | Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w | |
56 | aplikacjach desktopowych (oparta na kodzie xpdf-3.0). | |
57 | ||
58 | %package devel | |
59 | Summary: Poppler header files | |
60 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Poppler | |
61 | Group: Development/Libraries | |
62 | Requires: %{name} = %{version}-%{release} | |
63 | Requires: curl-devel | |
64 | Requires: fontconfig-devel >= 2.0.0 | |
65 | Requires: freetype-devel >= 2.0 | |
66 | Requires: lcms2-devel | |
67 | Requires: libjpeg-devel | |
68 | Requires: libpng-devel | |
69 | Requires: libstdc++-devel | |
70 | Requires: libtiff-devel | |
71 | Requires: openjpeg-devel | |
72 | Requires: zlib-devel | |
73 | ||
74 | %description devel | |
75 | Header files for the Poppler library. | |
76 | ||
77 | %description devel -l pl.UTF-8 | |
78 | Pliki nagłówkowe biblioteki Poppler. | |
79 | ||
80 | %package static | |
81 | Summary: Poppler static libraries | |
82 | Summary(pl.UTF-8): Statyczne biblioteki Poppler | |
83 | Group: Development/Libraries | |
84 | Requires: %{name}-devel = %{version}-%{release} | |
85 | ||
86 | %description static | |
87 | Poppler static libraries. | |
88 | ||
89 | %description static -l pl.UTF-8 | |
90 | Statyczne biblioteki Poppler. | |
91 | ||
92 | %package apidocs | |
93 | Summary: Poppler library API documentation | |
94 | Summary(pl.UTF-8): Dokumentacja API biblioteki Poppler | |
95 | Group: Documentation | |
96 | Requires: gtk-doc-common | |
97 | ||
98 | %description apidocs | |
99 | Poppler library API documentation. | |
100 | ||
101 | %description apidocs -l pl.UTF-8 | |
102 | Dokumentacja API biblioteki Poppler. | |
103 | ||
104 | %package cpp | |
105 | Summary: Cpp wrapper for poppler | |
106 | Summary(pl.UTF-8): Wrapper cpp dla popplera | |
107 | Group: Libraries | |
108 | Requires: %{name} = %{version}-%{release} | |
109 | ||
110 | %description cpp | |
111 | Cpp wrapper for poppler. | |
112 | ||
113 | %description cpp -l pl.UTF-8 | |
114 | Wrapper cpp dla popplera. | |
115 | ||
116 | %package cpp-devel | |
117 | Summary: Header files for cpp wrapper for poppler | |
118 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera cpp dla popplera | |
119 | Group: Development/Libraries | |
120 | Requires: %{name}-cpp = %{version}-%{release} | |
121 | Requires: %{name}-devel = %{version}-%{release} | |
122 | ||
123 | %description cpp-devel | |
124 | Header files for cpp wrapper for poppler. | |
125 | ||
126 | %description cpp-devel -l pl.UTF-8 | |
127 | Pliki nagłówkowe wrappera cpp dla popplera. | |
128 | ||
129 | %package cpp-static | |
130 | Summary: Static version of cpp wrapper for poppler | |
131 | Summary(pl.UTF-8): Statyczna wersja wrappera cpp dla popplera | |
132 | Group: Development/Libraries | |
133 | Requires: %{name}-cpp-devel = %{version}-%{release} | |
134 | ||
135 | %description cpp-static | |
136 | Static version of cpp wrapper for poppler. | |
137 | ||
138 | %description cpp-static -l pl.UTF-8 | |
139 | Statyczna wersja wrappera cpp dla popplera. | |
140 | ||
141 | %package glib | |
142 | Summary: GLib wrapper for poppler | |
143 | Summary(pl.UTF-8): Wrapper GLib dla popplera | |
144 | Group: Libraries | |
145 | Requires: %{name} = %{version}-%{release} | |
146 | %{?with_cairo:Requires: cairo >= %{cairo_ver}} | |
147 | Requires: glib2 >= 1:2.18.0 | |
148 | ||
149 | %description glib | |
150 | GLib wrapper for poppler. | |
151 | ||
152 | %description glib -l pl.UTF-8 | |
153 | Wrapper GLib dla popplera. | |
154 | ||
155 | %package glib-devel | |
156 | Summary: Header files for GLib wrapper for poppler | |
157 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera GLib dla popplera | |
158 | Group: Development/Libraries | |
159 | Requires: %{name}-devel = %{version}-%{release} | |
160 | Requires: %{name}-glib = %{version}-%{release} | |
161 | %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}} | |
162 | Requires: glib2-devel >= 1:2.18.0 | |
163 | ||
164 | %description glib-devel | |
165 | Header files for GLib wrapper for poppler. | |
166 | ||
167 | %description glib-devel -l pl.UTF-8 | |
168 | Pliki nagłówkowe wrappera GLib dla popplera. | |
169 | ||
170 | %package glib-static | |
171 | Summary: Static version of GLib wrapper for poppler | |
172 | Summary(pl.UTF-8): Statyczna wersja wrappera GLib dla popplera | |
173 | Group: Development/Libraries | |
174 | Requires: %{name}-glib-devel = %{version}-%{release} | |
175 | ||
176 | %description glib-static | |
177 | Static version of GLib wrapper for poppler. | |
178 | ||
179 | %description glib-static -l pl.UTF-8 | |
180 | Statyczna wersja wrappera GLib dla popplera. | |
181 | ||
182 | %package Qt | |
183 | Summary: Qt4 wrapper for poppler | |
184 | Summary(pl.UTF-8): Wrapper Qt4 dla popplera | |
185 | Group: Libraries | |
186 | Requires: %{name} = %{version}-%{release} | |
187 | Requires: QtGui >= 4.4.0 | |
188 | Requires: QtXml >= 4.4.0 | |
189 | Obsoletes: poppler-qt | |
190 | ||
191 | %description Qt | |
192 | Qt4 wrapper for poppler. | |
193 | ||
194 | %description Qt -l pl.UTF-8 | |
195 | Wrapper Qt4 dla popplera. | |
196 | ||
197 | %package Qt-devel | |
198 | Summary: Header files for Qt4 wrapper for poppler | |
199 | Summary(pl.UTF-8): Pliki nagłówkowe wrappera Qt4 dla popplera | |
200 | Group: Development/Libraries | |
201 | Requires: %{name}-Qt = %{version}-%{release} | |
202 | Requires: %{name}-devel = %{version}-%{release} | |
203 | Requires: QtGui-devel >= 4.4.0 | |
204 | Requires: QtXml-devel >= 4.4.0 | |
205 | Obsoletes: poppler-qt-devel | |
206 | ||
207 | %description Qt-devel | |
208 | Header files for Qt4 wrapper for poppler. | |
209 | ||
210 | %description Qt-devel -l pl.UTF-8 | |
211 | Pliki nagłówkowe wrapper Qt4 dla popplera. | |
212 | ||
213 | %package Qt-static | |
214 | Summary: Static version of Qt4 wrapper for poppler | |
215 | Summary(pl.UTF-8): Statyczna wersja wrappera Qt4 dla popplera | |
216 | Group: Development/Libraries | |
217 | Requires: %{name}-Qt-devel = %{version}-%{release} | |
218 | Obsoletes: poppler-qt-static | |
219 | ||
220 | %description Qt-static | |
221 | Static version of Qt4 wrapper for poppler. | |
222 | ||
223 | %description Qt-static -l pl.UTF-8 | |
224 | Statyczna wersja wrappera Qt4 dla popplera. | |
225 | ||
226 | %package progs | |
227 | Summary: Set of tools for viewing information and converting PDF files | |
228 | Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF | |
229 | Group: Applications/Publishing | |
230 | Provides: pdftops | |
231 | Obsoletes: pdftohtml | |
232 | Obsoletes: pdftohtml-pdftops | |
233 | Obsoletes: poppler-utils | |
234 | Obsoletes: xpdf-tools | |
235 | ||
236 | %description progs | |
237 | Package contains utilites for PDF files. These utilities allow to | |
238 | - extract information about PDF files, | |
239 | - extract images from PDF files, | |
240 | - convert PDF files to HTML, plain text and PS formats. | |
241 | ||
242 | %description progs -l pl.UTF-8 | |
243 | Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają | |
244 | - wyświetlanie informacji o plikach PDF, | |
245 | - wydobywanie obrazków z plików PDF, | |
246 | - konwersję plików PDF do formatów takich jak HTML, PS czy też | |
247 | czystego tekstu. | |
248 | ||
249 | %prep | |
250 | %setup -q | |
251 | ||
252 | %build | |
253 | %{?with_apidocs:%{__gtkdocize}} | |
254 | %{__libtoolize} | |
255 | %{__aclocal} -I m4 | |
256 | %{__autoconf} -f | |
257 | %{__autoheader} | |
258 | %{__automake} | |
259 | %configure \ | |
260 | MOCQT4=/usr/bin/moc-qt4 \ | |
261 | --disable-gtk-test \ | |
262 | --enable-libcurl \ | |
263 | %{?with_apidocs:--enable-gtk-doc} \ | |
264 | %{!?with_cairo:--disable-cairo-output} \ | |
265 | %{!?with_cpp:--disable-poppler-cpp} \ | |
266 | %{!?with_glib:--disable-poppler-glib} \ | |
267 | %{!?with_qt4:--disable-poppler-qt4} \ | |
268 | --disable-silent-rules \ | |
269 | --enable-xpdf-headers \ | |
270 | --enable-zlib \ | |
271 | --enable-dependency-tracking \ | |
272 | --with-html-dir=%{_gtkdocdir} | |
273 | ||
274 | %{__make} | |
275 | ||
276 | %install | |
277 | rm -rf $RPM_BUILD_ROOT | |
278 | ||
279 | %{__make} install \ | |
280 | DESTDIR=$RPM_BUILD_ROOT | |
281 | ||
282 | %if %{without apidocs} | |
283 | # why it still installs them, brr | |
284 | %{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/poppler || : | |
285 | %endif | |
286 | ||
287 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
288 | ||
289 | %clean | |
290 | rm -rf $RPM_BUILD_ROOT | |
291 | ||
292 | %post -p /sbin/ldconfig | |
293 | %postun -p /sbin/ldconfig | |
294 | ||
295 | %post cpp -p /sbin/ldconfig | |
296 | %postun cpp -p /sbin/ldconfig | |
297 | ||
298 | %post glib -p /sbin/ldconfig | |
299 | %postun glib -p /sbin/ldconfig | |
300 | ||
301 | %post Qt -p /sbin/ldconfig | |
302 | %postun Qt -p /sbin/ldconfig | |
303 | ||
304 | %files | |
305 | %defattr(644,root,root,755) | |
306 | %doc AUTHORS ChangeLog NEWS README* TODO | |
307 | %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.* | |
308 | %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.25 | |
309 | ||
310 | %files devel | |
311 | %defattr(644,root,root,755) | |
312 | %attr(755,root,root) %{_libdir}/libpoppler.so | |
313 | %dir %{_includedir}/poppler | |
314 | %{_includedir}/poppler/poppler-config.h | |
315 | %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h | |
316 | %{_includedir}/poppler/fofi | |
317 | %{_includedir}/poppler/goo | |
318 | %{_includedir}/poppler/splash | |
319 | %{_pkgconfigdir}/poppler.pc | |
320 | %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc} | |
321 | %{_pkgconfigdir}/poppler-splash.pc | |
322 | ||
323 | %files static | |
324 | %defattr(644,root,root,755) | |
325 | %{_libdir}/libpoppler.a | |
326 | ||
327 | %if %{with apidocs} | |
328 | %files apidocs | |
329 | %defattr(644,root,root,755) | |
330 | %{_gtkdocdir}/poppler | |
331 | %endif | |
332 | ||
333 | %if %{with cpp} | |
334 | %files cpp | |
335 | %defattr(644,root,root,755) | |
336 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.* | |
337 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0 | |
338 | ||
339 | %files cpp-devel | |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_libdir}/libpoppler-cpp.so | |
342 | %{_includedir}/poppler/cpp | |
343 | %{_pkgconfigdir}/poppler-cpp.pc | |
344 | ||
345 | %files cpp-static | |
346 | %defattr(644,root,root,755) | |
347 | %{_libdir}/libpoppler-cpp.a | |
348 | %endif | |
349 | ||
350 | %if %{with glib} | |
351 | %files glib | |
352 | %defattr(644,root,root,755) | |
353 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.* | |
354 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8 | |
355 | %{_libdir}/girepository-1.0/Poppler-0.18.typelib | |
356 | ||
357 | %files glib-devel | |
358 | %defattr(644,root,root,755) | |
359 | %attr(755,root,root) %{_libdir}/libpoppler-glib.so | |
360 | %{_includedir}/poppler/glib | |
361 | %{_pkgconfigdir}/poppler-glib.pc | |
362 | %{_datadir}/gir-1.0/Poppler-0.18.gir | |
363 | ||
364 | %files glib-static | |
365 | %defattr(644,root,root,755) | |
366 | %{_libdir}/libpoppler-glib.a | |
367 | %endif | |
368 | ||
369 | %if %{with qt4} | |
370 | %files Qt | |
371 | %defattr(644,root,root,755) | |
372 | %attr(755,root,root) %{_libdir}/libpoppler-qt4.so.*.*.* | |
373 | %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt4.so.4 | |
374 | ||
375 | %files Qt-devel | |
376 | %defattr(644,root,root,755) | |
377 | %attr(755,root,root) %{_libdir}/libpoppler-qt4.so | |
378 | %{_includedir}/poppler/qt4 | |
379 | %{_pkgconfigdir}/poppler-qt4.pc | |
380 | ||
381 | %files Qt-static | |
382 | %defattr(644,root,root,755) | |
383 | %{_libdir}/libpoppler-qt4.a | |
384 | %endif | |
385 | ||
386 | %files progs | |
387 | %defattr(644,root,root,755) | |
388 | %attr(755,root,root) %{_bindir}/pdf* | |
389 | %{_mandir}/man1/pdf* |