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