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