]> git.pld-linux.org Git - packages/poppler.git/blob - poppler.spec
- updated to 0.86.1 (new libpoppler soname again)
[packages/poppler.git] / poppler.spec
1 #
2 # Conditional build:
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
8
9 %define         cairo_ver       1.10.0
10 %define         qt5_ver         5.0.0
11 Summary:        PDF rendering library
12 Summary(pl.UTF-8):      Biblioteka renderująca PDF
13 Name:           poppler
14 Version:        0.86.1
15 Release:        1
16 License:        GPL v2+
17 Group:          Libraries
18 Source0:        https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
19 # Source0-md5:  2a638739f29e82a0a57b633ea39c87f3
20 Patch0:         %{name}-gtkdocdir.patch
21 URL:            https://poppler.freedesktop.org/
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}}
27 BuildRequires:  boost-devel >= 1.58.0
28 %{?with_cairo:BuildRequires:    cairo-devel >= %{cairo_ver}}
29 BuildRequires:  cmake >= 3.1.0
30 BuildRequires:  curl-devel
31 BuildRequires:  docbook-dtd412-xml
32 BuildRequires:  fontconfig-devel >= 2.0.0
33 BuildRequires:  freetype-devel >= 2.0
34 BuildRequires:  gettext-tools
35 %{?with_glib:BuildRequires:     glib2-devel >= 1:2.41}
36 %{?with_glib:BuildRequires:     gobject-introspection-devel >= 0.9.12}
37 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.14}
38 BuildRequires:  lcms2-devel >= 2
39 BuildRequires:  libjpeg-devel
40 BuildRequires:  libpng-devel
41 # -std=c++14
42 BuildRequires:  libstdc++-devel >= 6:5.0
43 BuildRequires:  libtiff-devel
44 BuildRequires:  libxml2-devel >= 2.0
45 BuildRequires:  nss-devel >= 3.19
46 BuildRequires:  openjpeg2-devel >= 2
47 BuildRequires:  pkgconfig >= 1:0.18
48 # wanted cairo backends
49 BuildRequires:  pkgconfig(cairo-pdf) >= %{cairo_ver}
50 BuildRequires:  pkgconfig(cairo-ps) >= %{cairo_ver}
51 BuildRequires:  pkgconfig(cairo-svg) >= %{cairo_ver}
52 %{?with_qt5:BuildRequires:      qt5-build >= %{qt5_ver}}
53 BuildRequires:  sed >= 4.0
54 BuildRequires:  tar >= 1:1.22
55 BuildRequires:  which
56 BuildRequires:  xz
57 BuildRequires:  zlib-devel
58 Requires:       openjpeg2 >= 2
59 Obsoletes:      poppler-qt4-static
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
63 A common PDF rendering library for integrating PDF viewing into
64 desktop applications (based on the xpdf-3.0 code base).
65
66 %description -l pl.UTF-8
67 Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w
68 aplikacjach desktopowych (oparta na kodzie xpdf-3.0).
69
70 %package devel
71 Summary:        Poppler header files
72 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Poppler
73 Group:          Development/Libraries
74 Requires:       %{name} = %{version}-%{release}
75 Requires:       curl-devel
76 Requires:       lcms2-devel >= 2
77 Requires:       libstdc++-devel >= 6:5.0
78 Requires:       nss-devel >= 3.19
79 Conflicts:      poppler0.61-devel
80
81 %description devel
82 Header files for the Poppler library.
83
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki Poppler.
86
87 %package static
88 Summary:        Poppler static libraries
89 Summary(pl.UTF-8):      Statyczne biblioteki Poppler
90 Group:          Development/Libraries
91 Requires:       %{name}-devel = %{version}-%{release}
92
93 %description static
94 Poppler static libraries.
95
96 %description static -l pl.UTF-8
97 Statyczne biblioteki Poppler.
98
99 %package apidocs
100 Summary:        Poppler library API documentation
101 Summary(pl.UTF-8):      Dokumentacja API biblioteki Poppler
102 Group:          Documentation
103 Requires:       gtk-doc-common
104 %if "%{_rpmversion}" >= "5"
105 BuildArch:      noarch
106 %endif
107
108 %description apidocs
109 Poppler library API documentation.
110
111 %description apidocs -l pl.UTF-8
112 Dokumentacja API biblioteki Poppler.
113
114 %package cpp
115 Summary:        Cpp wrapper for poppler
116 Summary(pl.UTF-8):      Wrapper cpp dla popplera
117 Group:          Libraries
118 Requires:       %{name} = %{version}-%{release}
119
120 %description cpp
121 Cpp wrapper for poppler.
122
123 %description cpp -l pl.UTF-8
124 Wrapper cpp dla popplera.
125
126 %package cpp-devel
127 Summary:        Header files for cpp wrapper for poppler
128 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera cpp dla popplera
129 Group:          Development/Libraries
130 Requires:       %{name}-cpp = %{version}-%{release}
131 Requires:       %{name}-devel = %{version}-%{release}
132
133 %description cpp-devel
134 Header files for cpp wrapper for poppler.
135
136 %description cpp-devel -l pl.UTF-8
137 Pliki nagłówkowe wrappera cpp dla popplera.
138
139 %package cpp-static
140 Summary:        Static version of cpp wrapper for poppler
141 Summary(pl.UTF-8):      Statyczna wersja wrappera cpp dla popplera
142 Group:          Development/Libraries
143 Requires:       %{name}-cpp-devel = %{version}-%{release}
144
145 %description cpp-static
146 Static version of cpp wrapper for poppler.
147
148 %description cpp-static -l pl.UTF-8
149 Statyczna wersja wrappera cpp dla popplera.
150
151 %package glib
152 Summary:        GLib wrapper for poppler
153 Summary(pl.UTF-8):      Wrapper GLib dla popplera
154 Group:          Libraries
155 Requires:       %{name} = %{version}-%{release}
156 %{?with_cairo:Requires: cairo >= %{cairo_ver}}
157 Requires:       glib2 >= 1:2.41
158
159 %description glib
160 GLib wrapper for poppler.
161
162 %description glib -l pl.UTF-8
163 Wrapper GLib dla popplera.
164
165 %package glib-devel
166 Summary:        Header files for GLib wrapper for poppler
167 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera GLib dla popplera
168 Group:          Development/Libraries
169 Requires:       %{name}-devel = %{version}-%{release}
170 Requires:       %{name}-glib = %{version}-%{release}
171 %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}}
172 Requires:       glib2-devel >= 1:2.41
173
174 %description glib-devel
175 Header files for GLib wrapper for poppler.
176
177 %description glib-devel -l pl.UTF-8
178 Pliki nagłówkowe wrappera GLib dla popplera.
179
180 %package glib-static
181 Summary:        Static version of GLib wrapper for poppler
182 Summary(pl.UTF-8):      Statyczna wersja wrappera GLib dla popplera
183 Group:          Development/Libraries
184 Requires:       %{name}-glib-devel = %{version}-%{release}
185
186 %description glib-static
187 Static version of GLib wrapper for poppler.
188
189 %description glib-static -l pl.UTF-8
190 Statyczna wersja wrappera GLib dla popplera.
191
192 %package qt5
193 Summary:        Qt5 wrapper for poppler
194 Summary(pl.UTF-8):      Wrapper Qt5 dla popplera
195 Group:          Libraries
196 Requires:       %{name} = %{version}-%{release}
197
198 %description qt5
199 Qt5 wrapper for poppler.
200
201 %description qt5 -l pl.UTF-8
202 Wrapper Qt5 dla popplera.
203
204 %package qt5-devel
205 Summary:        Header files for Qt5 wrapper for poppler
206 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera Qt5 dla popplera
207 Group:          Development/Libraries
208 Requires:       %{name}-devel = %{version}-%{release}
209 Requires:       %{name}-qt5 = %{version}-%{release}
210 Requires:       Qt5Core-devel >= %{qt5_ver}
211 Requires:       Qt5Gui-devel >= %{qt5_ver}
212 Requires:       Qt5Widgets-devel >= %{qt5_ver}
213 Requires:       Qt5Xml-devel >= %{qt5_ver}
214
215 %description qt5-devel
216 Header files for Qt5 wrapper for poppler.
217
218 %description qt5-devel -l pl.UTF-8
219 Pliki nagłówkowe wrapper Qt5 dla popplera.
220
221 %package qt5-static
222 Summary:        Static version of Qt5 wrapper for poppler
223 Summary(pl.UTF-8):      Statyczna wersja wrappera Qt5 dla popplera
224 Group:          Development/Libraries
225 Requires:       %{name}-qt5-devel = %{version}-%{release}
226
227 %description qt5-static
228 Static version of Qt5 wrapper for poppler.
229
230 %description qt5-static -l pl.UTF-8
231 Statyczna wersja wrappera Qt5 dla popplera.
232
233 %package progs
234 Summary:        Set of tools for viewing information and converting PDF files
235 Summary(pl.UTF-8):      Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
236 Group:          Applications/Publishing
237 Provides:       pdftops
238 Obsoletes:      pdftohtml
239 Obsoletes:      pdftohtml-pdftops
240 Obsoletes:      poppler-utils
241 Obsoletes:      xpdf-tools
242
243 %description progs
244 Package contains utilites for PDF files. These utilities allow to
245 - extract information about PDF files,
246 - extract images from PDF files,
247 - convert PDF files to HTML, plain text and PS formats.
248
249 %description progs -l pl.UTF-8
250 Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
251 - wyświetlanie informacji o plikach PDF,
252 - wydobywanie obrazków z plików PDF,
253 - konwersję plików PDF do formatów takich jak HTML, PS czy też
254   czystego tekstu.
255
256 %prep
257 %setup -q
258 %patch0 -p1
259
260 %build
261 install -d build
262 cd build
263 %cmake .. \
264         %{!?with_cpp:-DENABLE_CPP=OFF} \
265         %{!?with_glib:-DENABLE_GLIB=OFF} \
266         %{?with_apidocs:-DENABLE_GTK_DOC=ON} \
267         -DENABLE_GTK_TESTS=OFF \
268         -DENABLE_LIBCURL=ON \
269         %{!?with_qt5:-DENABLE_QT5=OFF} \
270         -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
271         -DENABLE_ZLIB=ON \
272         %{!?with_cairo:-DWITH_CAIRO=OFF}
273
274 %{__make}
275 cd ..
276
277 install -d build-static
278 cd build-static
279 %cmake .. \
280         -DBUILD_SHARED_LIBS=OFF \
281         %{!?with_cpp:-DENABLE_CPP=OFF} \
282         %{!?with_glib:-DENABLE_GLIB=OFF} \
283         -DENABLE_GTK_DOC=OFF \
284         -DENABLE_GTK_TESTS=OFF \
285         -DENABLE_LIBCURL=ON \
286         %{!?with_qt5:-DENABLE_QT5=OFF} \
287         -DENABLE_ZLIB=ON \
288         %{!?with_cairo:-DWITH_CAIRO=OFF}
289
290 %{__make}
291
292 %install
293 rm -rf $RPM_BUILD_ROOT
294
295 %{__make} -C build-static install \
296         DESTDIR=$RPM_BUILD_ROOT
297
298 %{__make} -C build install \
299         DESTDIR=$RPM_BUILD_ROOT
300
301 %clean
302 rm -rf $RPM_BUILD_ROOT
303
304 %post   -p /sbin/ldconfig
305 %postun -p /sbin/ldconfig
306
307 %post   cpp -p /sbin/ldconfig
308 %postun cpp -p /sbin/ldconfig
309
310 %post   glib -p /sbin/ldconfig
311 %postun glib -p /sbin/ldconfig
312
313 %post   qt5 -p /sbin/ldconfig
314 %postun qt5 -p /sbin/ldconfig
315
316 %files
317 %defattr(644,root,root,755)
318 %doc AUTHORS ChangeLog NEWS README*
319 %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.97
321
322 %files devel
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_libdir}/libpoppler.so
325 %dir %{_includedir}/poppler
326 %{_includedir}/poppler/poppler-config.h
327 %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h
328 %{_includedir}/poppler/fofi
329 %{_includedir}/poppler/goo
330 %{_includedir}/poppler/splash
331 %{_pkgconfigdir}/poppler.pc
332 %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc}
333 %{_pkgconfigdir}/poppler-splash.pc
334
335 %files static
336 %defattr(644,root,root,755)
337 %{_libdir}/libpoppler.a
338
339 %if %{with apidocs}
340 %files apidocs
341 %defattr(644,root,root,755)
342 %{_gtkdocdir}/poppler
343 %endif
344
345 %if %{with cpp}
346 %files cpp
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.*
349 %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0
350
351 %files cpp-devel
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so
354 %{_includedir}/poppler/cpp
355 %{_pkgconfigdir}/poppler-cpp.pc
356
357 %files cpp-static
358 %defattr(644,root,root,755)
359 %{_libdir}/libpoppler-cpp.a
360 %endif
361
362 %if %{with glib}
363 %files glib
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.*
366 %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8
367 %{_libdir}/girepository-1.0/Poppler-0.18.typelib
368
369 %files glib-devel
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_libdir}/libpoppler-glib.so
372 %{_includedir}/poppler/glib
373 %{_pkgconfigdir}/poppler-glib.pc
374 %{_datadir}/gir-1.0/Poppler-0.18.gir
375
376 %files glib-static
377 %defattr(644,root,root,755)
378 %{_libdir}/libpoppler-glib.a
379 %endif
380
381 %if %{with qt5}
382 %files qt5
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.*
385 %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1
386
387 %files qt5-devel
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so
390 %{_includedir}/poppler/qt5
391 %{_pkgconfigdir}/poppler-qt5.pc
392
393 %files qt5-static
394 %defattr(644,root,root,755)
395 %{_libdir}/libpoppler-qt5.a
396 %endif
397
398 %files progs
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_bindir}/pdfattach
401 %attr(755,root,root) %{_bindir}/pdfdetach
402 %attr(755,root,root) %{_bindir}/pdffonts
403 %attr(755,root,root) %{_bindir}/pdfimages
404 %attr(755,root,root) %{_bindir}/pdfinfo
405 %attr(755,root,root) %{_bindir}/pdfseparate
406 %attr(755,root,root) %{_bindir}/pdfsig
407 %attr(755,root,root) %{_bindir}/pdftocairo
408 %attr(755,root,root) %{_bindir}/pdftohtml
409 %attr(755,root,root) %{_bindir}/pdftoppm
410 %attr(755,root,root) %{_bindir}/pdftops
411 %attr(755,root,root) %{_bindir}/pdftotext
412 %attr(755,root,root) %{_bindir}/pdfunite
413 %{_mandir}/man1/pdfattach.1*
414 %{_mandir}/man1/pdfdetach.1*
415 %{_mandir}/man1/pdffonts.1*
416 %{_mandir}/man1/pdfimages.1*
417 %{_mandir}/man1/pdfinfo.1*
418 %{_mandir}/man1/pdfseparate.1*
419 %{_mandir}/man1/pdfsig.1*
420 %{_mandir}/man1/pdftocairo.1*
421 %{_mandir}/man1/pdftohtml.1*
422 %{_mandir}/man1/pdftoppm.1*
423 %{_mandir}/man1/pdftops.1*
424 %{_mandir}/man1/pdftotext.1*
425 %{_mandir}/man1/pdfunite.1*
This page took 0.101372 seconds and 4 git commands to generate.