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