]> git.pld-linux.org Git - packages/poppler.git/blob - poppler.spec
rel 1.1
[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 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-cpp-static
58 Obsoletes:      poppler-glib-static
59 Obsoletes:      poppler-qt4
60 Obsoletes:      poppler-qt4-devel
61 Obsoletes:      poppler-qt4-static
62 Obsoletes:      poppler-qt5-static
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %description
66 A common PDF rendering library for integrating PDF viewing into
67 desktop applications (based on the xpdf-3.0 code base).
68
69 %description -l pl.UTF-8
70 Wspólna biblioteka renderująca PDF do integrowania oglądania PDF w
71 aplikacjach desktopowych (oparta na kodzie xpdf-3.0).
72
73 %package devel
74 Summary:        Poppler header files
75 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Poppler
76 Group:          Development/Libraries
77 Requires:       %{name} = %{version}-%{release}
78 Requires:       curl-devel
79 Requires:       lcms2-devel >= 2
80 Requires:       libstdc++-devel >= 6:4.7
81 Requires:       nss-devel >= 3
82
83 %description devel
84 Header files for the Poppler library.
85
86 %description devel -l pl.UTF-8
87 Pliki nagłówkowe biblioteki Poppler.
88
89 %package static
90 Summary:        Poppler static libraries
91 Summary(pl.UTF-8):      Statyczne biblioteki Poppler
92 Group:          Development/Libraries
93 Requires:       %{name}-devel = %{version}-%{release}
94
95 %description static
96 Poppler static libraries.
97
98 %description static -l pl.UTF-8
99 Statyczne biblioteki Poppler.
100
101 %package apidocs
102 Summary:        Poppler library API documentation
103 Summary(pl.UTF-8):      Dokumentacja API biblioteki Poppler
104 Group:          Documentation
105 Requires:       gtk-doc-common
106 %if "%{_rpmversion}" >= "5"
107 BuildArch:      noarch
108 %endif
109
110 %description apidocs
111 Poppler library API documentation.
112
113 %description apidocs -l pl.UTF-8
114 Dokumentacja API biblioteki Poppler.
115
116 %package cpp
117 Summary:        Cpp wrapper for poppler
118 Summary(pl.UTF-8):      Wrapper cpp dla popplera
119 Group:          Libraries
120 Requires:       %{name} = %{version}-%{release}
121
122 %description cpp
123 Cpp wrapper for poppler.
124
125 %description cpp -l pl.UTF-8
126 Wrapper cpp dla popplera.
127
128 %package cpp-devel
129 Summary:        Header files for cpp wrapper for poppler
130 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera cpp dla popplera
131 Group:          Development/Libraries
132 Requires:       %{name}-cpp = %{version}-%{release}
133 Requires:       %{name}-devel = %{version}-%{release}
134
135 %description cpp-devel
136 Header files for cpp wrapper for poppler.
137
138 %description cpp-devel -l pl.UTF-8
139 Pliki nagłówkowe wrappera cpp dla popplera.
140
141 %package glib
142 Summary:        GLib wrapper for poppler
143 Summary(pl.UTF-8):      Wrapper GLib dla popplera
144 Group:          Libraries
145 Requires:       %{name} = %{version}-%{release}
146 %{?with_cairo:Requires: cairo >= %{cairo_ver}}
147 Requires:       glib2 >= 1:2.41
148
149 %description glib
150 GLib wrapper for poppler.
151
152 %description glib -l pl.UTF-8
153 Wrapper GLib dla popplera.
154
155 %package glib-devel
156 Summary:        Header files for GLib wrapper for poppler
157 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera GLib dla popplera
158 Group:          Development/Libraries
159 Requires:       %{name}-devel = %{version}-%{release}
160 Requires:       %{name}-glib = %{version}-%{release}
161 %{?with_cairo:Requires: cairo-devel >= %{cairo_ver}}
162 Requires:       glib2-devel >= 1:2.41
163
164 %description glib-devel
165 Header files for GLib wrapper for poppler.
166
167 %description glib-devel -l pl.UTF-8
168 Pliki nagłówkowe wrappera GLib dla popplera.
169
170
171 %package qt5
172 Summary:        Qt5 wrapper for poppler
173 Summary(pl.UTF-8):      Wrapper Qt5 dla popplera
174 Group:          Libraries
175 Requires:       %{name} = %{version}-%{release}
176
177 %description qt5
178 Qt5 wrapper for poppler.
179
180 %description qt5 -l pl.UTF-8
181 Wrapper Qt5 dla popplera.
182
183 %package qt5-devel
184 Summary:        Header files for Qt5 wrapper for poppler
185 Summary(pl.UTF-8):      Pliki nagłówkowe wrappera Qt5 dla popplera
186 Group:          Development/Libraries
187 Requires:       %{name}-devel = %{version}-%{release}
188 Requires:       %{name}-qt5 = %{version}-%{release}
189 Requires:       Qt5Core-devel >= %{qt5_ver}
190 Requires:       Qt5Gui-devel >= %{qt5_ver}
191 Requires:       Qt5Widgets-devel >= %{qt5_ver}
192 Requires:       Qt5Xml-devel >= %{qt5_ver}
193
194 %description qt5-devel
195 Header files for Qt5 wrapper for poppler.
196
197 %description qt5-devel -l pl.UTF-8
198 Pliki nagłówkowe wrapper Qt5 dla popplera.
199
200 %package progs
201 Summary:        Set of tools for viewing information and converting PDF files
202 Summary(pl.UTF-8):      Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
203 Group:          Applications/Publishing
204 Provides:       pdftops
205 Obsoletes:      pdftohtml
206 Obsoletes:      pdftohtml-pdftops
207 Obsoletes:      poppler-utils
208 Obsoletes:      xpdf-tools
209
210 %description progs
211 Package contains utilites for PDF files. These utilities allow to
212 - extract information about PDF files,
213 - extract images from PDF files,
214 - convert PDF files to HTML, plain text and PS formats.
215
216 %description progs -l pl.UTF-8
217 Pakiet zawiera zestaw narzędzi do plików PDF. Programy te umożliwiają
218 - wyświetlanie informacji o plikach PDF,
219 - wydobywanie obrazków z plików PDF,
220 - konwersję plików PDF do formatów takich jak HTML, PS czy też
221   czystego tekstu.
222
223 %prep
224 %setup -q
225 %patch0 -p1
226
227 %build
228 install -d build
229 cd build
230 %cmake .. \
231         -DENABLE_GTK_TESTS=OFF \
232         -DENABLE_LIBCURL=ON \
233         %{?with_apidocs:-DENABLE_GTK_DOC=ON} \
234         %{!?with_cairo:-DWITH_CAIRO=OFF} \
235         %{!?with_cpp:-DENABLE_CPP=OFF} \
236         %{!?with_glib:-DENABLE_GLIB=OFF} \
237         %{!?with_qt5:-DENABLE_QT5=OFF} \
238         -DENABLE_XPDF_HEADERS=ON \
239         -DENABLE_ZLIB=ON
240
241 %{__make}
242 cd ..
243
244 install -d build-static
245 cd build-static
246 %cmake .. \
247         -DBUILD_SHARED_LIBS=OFF \
248         -DENABLE_GTK_TESTS=OFF \
249         -DENABLE_LIBCURL=ON \
250         %{?with_apidocs:-DENABLE_GTK_DOC=ON} \
251         %{!?with_cairo:-DWITH_CAIRO=OFF} \
252         %{!?with_cpp:-DENABLE_CPP=OFF} \
253         %{!?with_glib:-DENABLE_GLIB=OFF} \
254         %{!?with_qt5:-DENABLE_QT5=OFF} \
255         -DENABLE_XPDF_HEADERS=ON \
256         -DENABLE_ZLIB=ON
257
258 %{__make}
259
260 %install
261 rm -rf $RPM_BUILD_ROOT
262
263 %{__make} -C build-static install \
264         DESTDIR=$RPM_BUILD_ROOT
265
266 %{__make} -C build install \
267         DESTDIR=$RPM_BUILD_ROOT
268
269 %clean
270 rm -rf $RPM_BUILD_ROOT
271
272 %post   -p /sbin/ldconfig
273 %postun -p /sbin/ldconfig
274
275 %post   cpp -p /sbin/ldconfig
276 %postun cpp -p /sbin/ldconfig
277
278 %post   glib -p /sbin/ldconfig
279 %postun glib -p /sbin/ldconfig
280
281 %post   qt5 -p /sbin/ldconfig
282 %postun qt5 -p /sbin/ldconfig
283
284 %files
285 %defattr(644,root,root,755)
286 %doc AUTHORS ChangeLog NEWS README*
287 %attr(755,root,root) %{_libdir}/libpoppler.so.*.*.*
288 %attr(755,root,root) %ghost %{_libdir}/libpoppler.so.73
289
290 %files devel
291 %defattr(644,root,root,755)
292 %attr(755,root,root) %{_libdir}/libpoppler.so
293 %dir %{_includedir}/poppler
294 %{_includedir}/poppler/poppler-config.h
295 %{_includedir}/poppler/[ABCDEFGHJLMNOPRSTUVX]*.h
296 %{_includedir}/poppler/fofi
297 %{_includedir}/poppler/goo
298 %{_includedir}/poppler/splash
299 %{_pkgconfigdir}/poppler.pc
300 %{?with_cairo:%{_pkgconfigdir}/poppler-cairo.pc}
301 %{_pkgconfigdir}/poppler-splash.pc
302
303 %files static
304 %defattr(644,root,root,755)
305 %{_libdir}/libpoppler.a
306
307 %if %{with apidocs}
308 %files apidocs
309 %defattr(644,root,root,755)
310 %{_gtkdocdir}/poppler
311 %endif
312
313 %if %{with cpp}
314 %files cpp
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so.*.*.*
317 %attr(755,root,root) %ghost %{_libdir}/libpoppler-cpp.so.0
318
319 %files cpp-devel
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/libpoppler-cpp.so
322 %{_includedir}/poppler/cpp
323 %{_pkgconfigdir}/poppler-cpp.pc
324 %endif
325
326 %if %{with glib}
327 %files glib
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_libdir}/libpoppler-glib.so.*.*.*
330 %attr(755,root,root) %ghost %{_libdir}/libpoppler-glib.so.8
331 %{_libdir}/girepository-1.0/Poppler-0.18.typelib
332
333 %files glib-devel
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{_libdir}/libpoppler-glib.so
336 %{_includedir}/poppler/glib
337 %{_pkgconfigdir}/poppler-glib.pc
338 %{_datadir}/gir-1.0/Poppler-0.18.gir
339 %endif
340
341 %if %{with qt5}
342 %files qt5
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so.*.*.*
345 %attr(755,root,root) %ghost %{_libdir}/libpoppler-qt5.so.1
346
347 %files qt5-devel
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_libdir}/libpoppler-qt5.so
350 %{_includedir}/poppler/qt5
351 %{_pkgconfigdir}/poppler-qt5.pc
352 %endif
353
354 %files progs
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_bindir}/pdfdetach
357 %attr(755,root,root) %{_bindir}/pdffonts
358 %attr(755,root,root) %{_bindir}/pdfimages
359 %attr(755,root,root) %{_bindir}/pdfinfo
360 %attr(755,root,root) %{_bindir}/pdfseparate
361 %attr(755,root,root) %{_bindir}/pdfsig
362 %attr(755,root,root) %{_bindir}/pdftocairo
363 %attr(755,root,root) %{_bindir}/pdftohtml
364 %attr(755,root,root) %{_bindir}/pdftoppm
365 %attr(755,root,root) %{_bindir}/pdftops
366 %attr(755,root,root) %{_bindir}/pdftotext
367 %attr(755,root,root) %{_bindir}/pdfunite
368 %{_mandir}/man1/pdfdetach.1*
369 %{_mandir}/man1/pdffonts.1*
370 %{_mandir}/man1/pdfimages.1*
371 %{_mandir}/man1/pdfinfo.1*
372 %{_mandir}/man1/pdfseparate.1*
373 %{_mandir}/man1/pdfsig.1*
374 %{_mandir}/man1/pdftocairo.1*
375 %{_mandir}/man1/pdftohtml.1*
376 %{_mandir}/man1/pdftoppm.1*
377 %{_mandir}/man1/pdftops.1*
378 %{_mandir}/man1/pdftotext.1*
379 %{_mandir}/man1/pdfunite.1*
This page took 0.096002 seconds and 4 git commands to generate.