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