]> git.pld-linux.org Git - packages/poppler.git/blob - poppler.spec
patch to fix build with gtk-doc 1.27
[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.62.0
15 Release:        1.1
16 License:        GPL v2+
17 Group:          Libraries
18 Source0:        https://poppler.freedesktop.org/%{name}-%{version}.tar.xz
19 # Source0-md5:  42b801f2defaccb6b6cf1bf783ee1552
20 Patch0:         %{name}-gtkdocdir.patch
21 Patch1:         %{name}-gtkdoc1_27.patch
22 URL:            https://poppler.freedesktop.org/
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}}
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 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 BuildRequires:  libstdc++-devel >= 6:4.7
42 BuildRequires:  libtiff-devel
43 BuildRequires:  libxml2-devel >= 2.0
44 BuildRequires:  nss-devel >= 3
45 BuildRequires:  openjpeg2-devel >= 2
46 BuildRequires:  pkgconfig >= 1:0.18
47 # wanted cairo backends
48 BuildRequires:  pkgconfig(cairo-pdf) >= %{cairo_ver}
49 BuildRequires:  pkgconfig(cairo-ps) >= %{cairo_ver}
50 BuildRequires:  pkgconfig(cairo-svg) >= %{cairo_ver}
51 %{?with_qt5:BuildRequires:      qt5-build >= %{qt5_ver}}
52 BuildRequires:  sed >= 4.0
53 BuildRequires:  tar >= 1:1.22
54 BuildRequires:  which
55 BuildRequires:  xz
56 BuildRequires:  zlib-devel
57 Requires:       openjpeg2 >= 2
58 Obsoletes:      poppler-cpp-static
59 Obsoletes:      poppler-glib-static
60 Obsoletes:      poppler-qt4
61 Obsoletes:      poppler-qt4-devel
62 Obsoletes:      poppler-qt4-static
63 Obsoletes:      poppler-qt5-static
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %description
67 A common PDF rendering library for integrating PDF viewing into
68 desktop applications (based on the xpdf-3.0 code base).
69
70 %description -l pl.UTF-8
71 Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w
72 aplikacjach desktopowych (oparta na kodzie xpdf-3.0).
73
74 %package devel
75 Summary:        Poppler header files
76 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Poppler
77 Group:          Development/Libraries
78 Requires:       %{name} = %{version}-%{release}
79 Requires:       curl-devel
80 Requires:       lcms2-devel >= 2
81 Requires:       libstdc++-devel >= 6:4.7
82 Requires:       nss-devel >= 3
83
84 %description devel
85 Header files for the Poppler library.
86
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki Poppler.
89
90 %package static
91 Summary:        Poppler static libraries
92 Summary(pl.UTF-8):      Statyczne biblioteki Poppler
93 Group:          Development/Libraries
94 Requires:       %{name}-devel = %{version}-%{release}
95
96 %description static
97 Poppler static libraries.
98
99 %description static -l pl.UTF-8
100 Statyczne biblioteki Poppler.
101
102 %package apidocs
103 Summary:        Poppler library API documentation
104 Summary(pl.UTF-8):      Dokumentacja API biblioteki Poppler
105 Group:          Documentation
106 Requires:       gtk-doc-common
107 %if "%{_rpmversion}" >= "5"
108 BuildArch:      noarch
109 %endif
110
111 %description apidocs
112 Poppler library API documentation.
113
114 %description apidocs -l pl.UTF-8
115 Dokumentacja API biblioteki Poppler.
116
117 %package cpp
118 Summary:        Cpp wrapper for poppler
119 Summary(pl.UTF-8):      Wrapper cpp dla popplera
120 Group:          Libraries
121 Requires:       %{name} = %{version}-%{release}
122
123 %description cpp
124 Cpp wrapper for poppler.
125
126 %description cpp -l pl.UTF-8
127 Wrapper cpp dla popplera.
128
129 %package cpp-devel
130 Summary:        Header files for cpp wrapper for poppler
131 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera cpp dla popplera
132 Group:          Development/Libraries
133 Requires:       %{name}-cpp = %{version}-%{release}
134 Requires:       %{name}-devel = %{version}-%{release}
135
136 %description cpp-devel
137 Header files for cpp wrapper for poppler.
138
139 %description cpp-devel -l pl.UTF-8
140 Pliki nagłówkowe wrappera cpp dla popplera.
141
142 %package glib
143 Summary:        GLib wrapper for poppler
144 Summary(pl.UTF-8):      Wrapper GLib dla popplera
145 Group:          Libraries
146 Requires:       %{name} = %{version}-%{release}
147 %{?with_cairo:Requires: cairo >= %{cairo_ver}}
148 Requires:       glib2 >= 1:2.41
149
150 %description glib
151 GLib wrapper for poppler.
152
153 %description glib -l pl.UTF-8
154 Wrapper GLib dla popplera.
155
156 %package glib-devel
157 Summary:        Header files for GLib wrapper for poppler
158 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera GLib dla popplera
159 Group:          Development/Libraries
160 Requires:       %{name}-devel = %{version}-%{release}
161 Requires:       %{name}-glib = %{version}-%{release}
162 %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}}
163 Requires:       glib2-devel >= 1:2.41
164
165 %description glib-devel
166 Header files for GLib wrapper for poppler.
167
168 %description glib-devel -l pl.UTF-8
169 Pliki nagłówkowe wrappera GLib dla popplera.
170
171
172 %package qt5
173 Summary:        Qt5 wrapper for poppler
174 Summary(pl.UTF-8):      Wrapper Qt5 dla popplera
175 Group:          Libraries
176 Requires:       %{name} = %{version}-%{release}
177
178 %description qt5
179 Qt5 wrapper for poppler.
180
181 %description qt5 -l pl.UTF-8
182 Wrapper Qt5 dla popplera.
183
184 %package qt5-devel
185 Summary:        Header files for Qt5 wrapper for poppler
186 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera Qt5 dla popplera
187 Group:          Development/Libraries
188 Requires:       %{name}-devel = %{version}-%{release}
189 Requires:       %{name}-qt5 = %{version}-%{release}
190 Requires:       Qt5Core-devel >= %{qt5_ver}
191 Requires:       Qt5Gui-devel >= %{qt5_ver}
192 Requires:       Qt5Widgets-devel >= %{qt5_ver}
193 Requires:       Qt5Xml-devel >= %{qt5_ver}
194
195 %description qt5-devel
196 Header files for Qt5 wrapper for poppler.
197
198 %description qt5-devel -l pl.UTF-8
199 Pliki nagłówkowe wrapper Qt5 dla popplera.
200
201 %package progs
202 Summary:        Set of tools for viewing information and converting PDF files
203 Summary(pl.UTF-8):      Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
204 Group:          Applications/Publishing
205 Provides:       pdftops
206 Obsoletes:      pdftohtml
207 Obsoletes:      pdftohtml-pdftops
208 Obsoletes:      poppler-utils
209 Obsoletes:      xpdf-tools
210
211 %description progs
212 Package contains utilites for PDF files. These utilities allow to
213 - extract information about PDF files,
214 - extract images from PDF files,
215 - convert PDF files to HTML, plain text and PS formats.
216
217 %description progs -l pl.UTF-8
218 Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
219 - wyświetlanie informacji o plikach PDF,
220 - wydobywanie obrazków z plików PDF,
221 - konwersję plików PDF do formatów takich jak HTML, PS czy też
222   czystego tekstu.
223
224 %prep
225 %setup -q
226 %patch0 -p1
227 %patch1 -p1
228
229 %build
230 install -d build
231 cd 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}
244 cd ..
245
246 install -d build-static
247 cd 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
259
260 %{__make}
261
262 %install
263 rm -rf $RPM_BUILD_ROOT
264
265 %{__make} -C build-static install \
266         DESTDIR=$RPM_BUILD_ROOT
267
268 %{__make} -C build install \
269         DESTDIR=$RPM_BUILD_ROOT
270
271 %clean
272 rm -rf $RPM_BUILD_ROOT
273
274 %post   -p /sbin/ldconfig
275 %postun -p /sbin/ldconfig
276
277 %post   cpp -p /sbin/ldconfig
278 %postun cpp -p /sbin/ldconfig
279
280 %post   glib -p /sbin/ldconfig
281 %postun glib -p /sbin/ldconfig
282
283 %post   qt5 -p /sbin/ldconfig
284 %postun qt5 -p /sbin/ldconfig
285
286 %files
287 %defattr(644,root,root,755)
288 %doc AUTHORS ChangeLog NEWS README*
289 %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.*
290 %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.73
291
292 %files devel
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/libpoppler.so
295 %dir %{_includedir}/poppler
296 %{_includedir}/poppler/poppler-config.h
297 %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h
298 %{_includedir}/poppler/fofi
299 %{_includedir}/poppler/goo
300 %{_includedir}/poppler/splash
301 %{_pkgconfigdir}/poppler.pc
302 %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc}
303 %{_pkgconfigdir}/poppler-splash.pc
304
305 %files static
306 %defattr(644,root,root,755)
307 %{_libdir}/libpoppler.a
308
309 %if %{with apidocs}
310 %files apidocs
311 %defattr(644,root,root,755)
312 %{_gtkdocdir}/poppler
313 %endif
314
315 %if %{with cpp}
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
324 %{_includedir}/poppler/cpp
325 %{_pkgconfigdir}/poppler-cpp.pc
326 %endif
327
328 %if %{with glib}
329 %files glib
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.*
332 %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8
333 %{_libdir}/girepository-1.0/Poppler-0.18.typelib
334
335 %files glib-devel
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libpoppler-glib.so
338 %{_includedir}/poppler/glib
339 %{_pkgconfigdir}/poppler-glib.pc
340 %{_datadir}/gir-1.0/Poppler-0.18.gir
341 %endif
342
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
354 %endif
355
356 %files progs
357 %defattr(644,root,root,755)
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.079433 seconds and 4 git commands to generate.