]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - atril.desktop provides mimetypes for all possible choices, yet some of | |
3 | # them are in subpackages (backend-foo). Are multiple .desktop files possible | |
4 | # for the same application? | |
5 | # | |
6 | # Conditional build: | |
7 | %bcond_without apidocs # gtk-doc documentation | |
8 | %bcond_without caja # Caja plugin | |
9 | %bcond_without djvu # DJVU support | |
10 | %bcond_without dvi # DVI support | |
11 | %bcond_without epub # ePub support | |
12 | %bcond_without ps # PostScript support | |
13 | %bcond_without xps # XPS support | |
14 | ||
15 | Summary: Atril - MATE Desktop document viewer for multiple document formats | |
16 | Summary(pl.UTF-8): Atril - przeglądarka dokumentów w wielu formatach dla środowiska MATE | |
17 | Name: atril | |
18 | Version: 1.28.0 | |
19 | Release: 1 | |
20 | License: GPL v2+ | |
21 | Group: X11/Applications/Graphics | |
22 | Source0: https://pub.mate-desktop.org/releases/1.28/%{name}-%{version}.tar.xz | |
23 | # Source0-md5: e95c8aa600ec17548d473d2aa4e0635d | |
24 | Patch0: %{name}-kpathsea_config.patch | |
25 | URL: https://wiki.mate-desktop.org/mate-desktop/applications/atril/ | |
26 | BuildRequires: autoconf >= 2.57 | |
27 | BuildRequires: automake >= 1:1.10 | |
28 | BuildRequires: cairo-devel >= 1.14.0 | |
29 | %{?with_caja:BuildRequires: caja-devel >= 1.17.1} | |
30 | %{?with_djvu:BuildRequires: djvulibre-devel >= 3.5.17} | |
31 | BuildRequires: docbook-dtd412-xml | |
32 | BuildRequires: gettext-tools >= 0.19.8 | |
33 | BuildRequires: glib2-devel >= 1:2.54.0 | |
34 | BuildRequires: gobject-introspection-devel >= 0.6 | |
35 | BuildRequires: gtk+3-devel >= 3.22 | |
36 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.13} | |
37 | %{?with_epub:BuildRequires: gtk-webkit4.1-devel >= 2.6.0} | |
38 | %{?with_dvi:BuildRequires: kpathsea-devel} | |
39 | %{?with_xps:BuildRequires: libgxps-devel >= 0.2.1} | |
40 | BuildRequires: libsecret-devel >= 0.15 | |
41 | %if %{with dvi} || %{with ps} | |
42 | BuildRequires: libspectre-devel >= 0.2.0 | |
43 | %endif | |
44 | BuildRequires: libtiff-devel >= 3.6 | |
45 | BuildRequires: libtool >= 1:1.4.3 | |
46 | BuildRequires: libxml2-devel >= 1:2.5.0 | |
47 | BuildRequires: mate-common | |
48 | BuildRequires: mate-desktop-devel >= 1.27.1 | |
49 | BuildRequires: pkgconfig | |
50 | BuildRequires: poppler-glib-devel >= 0.22.0 | |
51 | BuildRequires: rpm-build >= 4.6 | |
52 | BuildRequires: rpmbuild(find_lang) >= 1.36 | |
53 | BuildRequires: rpmbuild(macros) >= 1.592 | |
54 | BuildRequires: synctex-devel >= 1.21 | |
55 | BuildRequires: t1lib-devel | |
56 | BuildRequires: tar >= 1:1.22 | |
57 | BuildRequires: xorg-lib-libICE-devel | |
58 | BuildRequires: xorg-lib-libSM-devel >= 1.0.0 | |
59 | BuildRequires: xorg-lib-libX11-devel | |
60 | BuildRequires: xz | |
61 | BuildRequires: yelp-tools | |
62 | BuildRequires: zlib-devel | |
63 | Requires(post,postun): desktop-file-utils | |
64 | Requires(post,postun): glib2 >= 1:2.54.0 | |
65 | Requires(post,postun): gtk-update-icon-cache | |
66 | Requires(post,postun): hicolor-icon-theme | |
67 | Requires: %{name}-libs = %{version}-%{release} | |
68 | Requires: gtk+3 >= 3.22 | |
69 | Requires: libsecret >= 0.15 | |
70 | Requires: libtiff >= 3.6 | |
71 | Requires: libxml2 >= 1:2.5.0 | |
72 | Requires: mate-desktop >= 1.27.1 | |
73 | Requires: xorg-lib-libSM >= 1.0.0 | |
74 | Suggests: atril-backend-djvu | |
75 | Suggests: atril-backend-dvi | |
76 | Suggests: atril-backend-pdf | |
77 | Suggests: atril-backend-ps | |
78 | Suggests: atril-backend-xps | |
79 | Suggests: gtk+3-cups >= 3.22 | |
80 | Obsoletes: mate-document-viewer < 1.8.0 | |
81 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
82 | ||
83 | %define backendsdir %{_libdir}/atril/3/backends | |
84 | ||
85 | %description | |
86 | Atril is a document viewer for multiple document formats like PDF and | |
87 | PostScript. Atril is a fork of Evince. | |
88 | ||
89 | %description -l pl.UTF-8 | |
90 | Atril jest przeglądarką dokumentów w wielu formatach takich jak PDF | |
91 | czy PostScript. Jest to odgałęzienie pakietu Evince. | |
92 | ||
93 | %package libs | |
94 | Summary: Atril shared libraries | |
95 | Summary(pl.UTF-8): Biblioteki współdzielone przeglądarki Atril | |
96 | Group: X11/Libraries | |
97 | Requires: cairo >= 1.14.0 | |
98 | Requires: glib2 >= 1:2.54.0 | |
99 | Requires: gtk+3 >= 3.22 | |
100 | Requires: gtk-webkit4.1 >= 2.6.0 | |
101 | Requires: synctex-libs >= 1.21 | |
102 | Obsoletes: mate-document-viewer-libs < 1.8.0 | |
103 | ||
104 | %description libs | |
105 | Atril shared libraries. | |
106 | ||
107 | %description libs -l pl.UTF-8 | |
108 | Biblioteki współdzielone przeglądarki Atril. | |
109 | ||
110 | %package devel | |
111 | Summary: Header files for Atril libraries | |
112 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek przeglądarki Atril | |
113 | Group: X11/Development/Libraries | |
114 | Requires: %{name}-libs = %{version}-%{release} | |
115 | Requires: glib2-devel >= 1:2.54.0 | |
116 | Requires: gtk+3-devel >= 3.22 | |
117 | Obsoletes: mate-document-viewer-devel < 1.8.0 | |
118 | ||
119 | %description devel | |
120 | Header files for Atril libraries. | |
121 | ||
122 | %description devel -l pl.UTF-8 | |
123 | Pliki nagłówkowe bibliotek przeglądarki Atril. | |
124 | ||
125 | %package apidocs | |
126 | Summary: Atril API documentation | |
127 | Summary(pl.UTF-8): Dokumentacja API aplikacji Atril | |
128 | Group: Documentation | |
129 | Requires: gtk-doc-common | |
130 | Obsoletes: mate-document-viewer-apidocs < 1.8.0 | |
131 | BuildArch: noarch | |
132 | ||
133 | %description apidocs | |
134 | Atril API documentation. | |
135 | ||
136 | %description apidocs -l pl.UTF-8 | |
137 | Dokumentacja API aplikacji Atril. | |
138 | ||
139 | %package backend-djvu | |
140 | Summary: View DJVu documents with Atril | |
141 | Summary(pl.UTF-8): Przeglądanie dokumentów DjVu w przeglądarce Atril | |
142 | Group: X11/Applications | |
143 | Requires: %{name} = %{version}-%{release} | |
144 | Requires: djvulibre >= 3.5.17 | |
145 | Obsoletes: mate-document-viewer-backend-djvu < 1.8.0 | |
146 | ||
147 | %description backend-djvu | |
148 | View DJVu documents with Atril. | |
149 | ||
150 | %description backend-djvu -l pl.UTF-8 | |
151 | Przeglądanie dokumentów DjVu w przeglądarce Atril. | |
152 | ||
153 | %package backend-dvi | |
154 | Summary: View DVI documents with Atril | |
155 | Summary(pl.UTF-8): Przeglądanie dokumentów DVI w przeglądarce Atril | |
156 | Group: X11/Applications | |
157 | Requires: %{name} = %{version}-%{release} | |
158 | Obsoletes: mate-document-viewer-backend-dvi < 1.8.0 | |
159 | ||
160 | %description backend-dvi | |
161 | View DVI documents with Atril. | |
162 | ||
163 | %description backend-dvi -l pl.UTF-8 | |
164 | Przeglądanie dokumentów DVI w przeglądarce Atril. | |
165 | ||
166 | %package backend-epub | |
167 | Summary: View ePub documents with Atril | |
168 | Summary(pl.UTF-8): Przeglądanie dokumentów ePub w przeglądarce Atril | |
169 | Group: X11/Applications | |
170 | Requires: %{name} = %{version}-%{release} | |
171 | Requires: libxml2 >= 1:2.5.0 | |
172 | ||
173 | %description backend-epub | |
174 | View ePub documents with Atril. | |
175 | ||
176 | %description backend-epub -l pl.UTF-8 | |
177 | Przeglądanie dokumentów ePub w przeglądarce Atril. | |
178 | ||
179 | %package backend-pdf | |
180 | Summary: View PDF documents with Atril | |
181 | Summary(pl.UTF-8): Przeglądanie dokumentów PDF w przeglądarce Atril | |
182 | Group: X11/Applications | |
183 | Requires: %{name} = %{version}-%{release} | |
184 | Requires: poppler-glib >= 0.22.0 | |
185 | Obsoletes: mate-document-viewer-backend-pdf < 1.8.0 | |
186 | ||
187 | %description backend-pdf | |
188 | View PDF documents with Atril. | |
189 | ||
190 | %description backend-pdf -l pl.UTF-8 | |
191 | Przeglądanie dokumentów PDF w przeglądarce Atril. | |
192 | ||
193 | %package backend-ps | |
194 | Summary: View PostScript documents with Atril | |
195 | Summary(pl.UTF-8): Przeglądanie dokumentów PostScript w przeglądarce Atril | |
196 | Group: X11/Applications | |
197 | Requires: %{name} = %{version}-%{release} | |
198 | Requires: libspectre >= 0.2.0 | |
199 | Obsoletes: mate-document-viewer-backend-ps < 1.8.0 | |
200 | ||
201 | %description backend-ps | |
202 | View PostScript documents with Atril. | |
203 | ||
204 | %description backend-ps -l pl.UTF-8 | |
205 | Przeglądanie dokumentów PostScript w przeglądarce Atril. | |
206 | ||
207 | %package backend-xps | |
208 | Summary: View XPS documents with Atril | |
209 | Summary(pl.UTF-8): Przeglądanie dokumentów XPS w przeglądarce Atril | |
210 | Group: X11/Applications | |
211 | Requires: %{name} = %{version}-%{release} | |
212 | Requires: libgxps >= 0.2.1 | |
213 | Obsoletes: mate-document-viewer-backend-xps < 1.8.0 | |
214 | ||
215 | %description backend-xps | |
216 | View XPS documents with Atril. | |
217 | ||
218 | %description backend-xps -l pl.UTF-8 | |
219 | Przeglądanie dokumentów XPS w przeglądarce Atril. | |
220 | ||
221 | %package -n caja-extension-atril | |
222 | Summary: Atril extension for Caja file manager | |
223 | Summary(pl.UTF-8): Rozszerzenie Atril dla zarządcy plików Caja | |
224 | Group: X11/Applications | |
225 | Requires: %{name} = %{version}-%{release} | |
226 | Requires: caja >= 1.17.1 | |
227 | Obsoletes: mate-file-manager-extension-atril < 1.8.0 | |
228 | ||
229 | %description -n caja-extension-atril | |
230 | Shows Atril document properties in Caja file manager. | |
231 | ||
232 | %description -n caja-extension-atril -l pl.UTF-8 | |
233 | Pokazuje właściwości dokumentu przeglądarki Atril w zarządcy plików | |
234 | Caja. | |
235 | ||
236 | %prep | |
237 | %setup -q | |
238 | %patch0 -p1 | |
239 | ||
240 | %build | |
241 | %{__gtkdocize} | |
242 | %{__libtoolize} | |
243 | %{__aclocal} -I m4 | |
244 | %{__autoconf} | |
245 | %{__autoheader} | |
246 | %{__automake} | |
247 | %configure \ | |
248 | %{!?with_caja:--disable-caja} \ | |
249 | --enable-comics \ | |
250 | %{__enable_disable djvu} \ | |
251 | %{__enable_disable dvi} \ | |
252 | %{__enable_disable epub} \ | |
253 | %{?with_apidocs:--enable-gtk-doc} \ | |
254 | --enable-introspection \ | |
255 | --enable-t1lib \ | |
256 | --enable-pdf \ | |
257 | --enable-pixbuf \ | |
258 | %{__enable_disable ps} \ | |
259 | --disable-schemas-compile \ | |
260 | --disable-silent-rules \ | |
261 | --disable-static \ | |
262 | --enable-tiff \ | |
263 | %{__enable_disable xps} \ | |
264 | --with-html-dir=%{_gtkdocdir} | |
265 | %{__make} | |
266 | ||
267 | %install | |
268 | rm -rf $RPM_BUILD_ROOT | |
269 | ||
270 | %{__make} install \ | |
271 | DESTDIR=$RPM_BUILD_ROOT | |
272 | ||
273 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libatril*.la | |
274 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/atril/3/backends/*.la | |
275 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/caja/extensions-2.0/*.la | |
276 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{es_ES,frp,ie,jv,ku_IQ,nqo,pms,ur_PK} | |
277 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/help/{ie,ku_IQ} | |
278 | ||
279 | %find_lang atril --with-mate | |
280 | ||
281 | %clean | |
282 | rm -rf $RPM_BUILD_ROOT | |
283 | ||
284 | %post | |
285 | %update_desktop_database_post | |
286 | %update_icon_cache hicolor | |
287 | %glib_compile_schemas | |
288 | ||
289 | %postun | |
290 | %update_desktop_database_postun | |
291 | %update_icon_cache hicolor | |
292 | %glib_compile_schemas | |
293 | ||
294 | %post libs -p /sbin/ldconfig | |
295 | %postun libs -p /sbin/ldconfig | |
296 | ||
297 | %files -f atril.lang | |
298 | %defattr(644,root,root,755) | |
299 | %doc AUTHORS ChangeLog NEWS README.md | |
300 | %attr(755,root,root) %{_bindir}/atril | |
301 | %attr(755,root,root) %{_bindir}/atril-previewer | |
302 | %attr(755,root,root) %{_bindir}/atril-thumbnailer | |
303 | %attr(755,root,root) %{_libexecdir}/atrild | |
304 | %dir %{_libdir}/atril | |
305 | %dir %{_libdir}/atril/3 | |
306 | %dir %{_libdir}/atril/3/backends | |
307 | %attr(755,root,root) %{_libdir}/atril/3/backends/libcomicsdocument.so | |
308 | %{_libdir}/atril/3/backends/comicsdocument.atril-backend | |
309 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpixbufdocument.so | |
310 | %{_libdir}/atril/3/backends/pixbufdocument.atril-backend | |
311 | %attr(755,root,root) %{_libdir}/atril/3/backends/libtiffdocument.so | |
312 | %{_libdir}/atril/3/backends/tiffdocument.atril-backend | |
313 | %{_datadir}/atril | |
314 | %{_datadir}/metainfo/atril.appdata.xml | |
315 | %{_datadir}/dbus-1/services/org.mate.atril.Daemon.service | |
316 | %{_datadir}/glib-2.0/schemas/org.mate.Atril.gschema.xml | |
317 | %{_datadir}/thumbnailers/atril.thumbnailer | |
318 | %{_mandir}/man1/atril.1* | |
319 | %{_mandir}/man1/atril-previewer.1* | |
320 | %{_mandir}/man1/atril-thumbnailer.1* | |
321 | %{_desktopdir}/atril.desktop | |
322 | %{_iconsdir}/hicolor/*x*/apps/atril.png | |
323 | %{_iconsdir}/hicolor/scalable/apps/atril.svg | |
324 | ||
325 | %files libs | |
326 | %defattr(644,root,root,755) | |
327 | %attr(755,root,root) %{_libdir}/libatrildocument.so.*.*.* | |
328 | %attr(755,root,root) %ghost %{_libdir}/libatrildocument.so.3 | |
329 | %attr(755,root,root) %{_libdir}/libatrilview.so.*.*.* | |
330 | %attr(755,root,root) %ghost %{_libdir}/libatrilview.so.3 | |
331 | %{_libdir}/girepository-1.0/AtrilDocument-1.5.0.typelib | |
332 | %{_libdir}/girepository-1.0/AtrilView-1.5.0.typelib | |
333 | ||
334 | %files devel | |
335 | %defattr(644,root,root,755) | |
336 | %attr(755,root,root) %{_libdir}/libatrildocument.so | |
337 | %attr(755,root,root) %{_libdir}/libatrilview.so | |
338 | %{_datadir}/gir-1.0/AtrilDocument-1.5.0.gir | |
339 | %{_datadir}/gir-1.0/AtrilView-1.5.0.gir | |
340 | %{_includedir}/atril | |
341 | %{_pkgconfigdir}/atril-document-1.5.0.pc | |
342 | %{_pkgconfigdir}/atril-view-1.5.0.pc | |
343 | ||
344 | %if %{with apidocs} | |
345 | %files apidocs | |
346 | %defattr(644,root,root,755) | |
347 | %{_gtkdocdir}/atril | |
348 | %{_gtkdocdir}/libatrildocument-1.5.0 | |
349 | %{_gtkdocdir}/libatrilview-1.5.0 | |
350 | %endif | |
351 | ||
352 | %if %{with djvu} | |
353 | %files backend-djvu | |
354 | %defattr(644,root,root,755) | |
355 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdjvudocument.so | |
356 | %{_libdir}/atril/3/backends/djvudocument.atril-backend | |
357 | %endif | |
358 | ||
359 | %if %{with dvi} | |
360 | %files backend-dvi | |
361 | %defattr(644,root,root,755) | |
362 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdvidocument.so | |
363 | %{_libdir}/atril/3/backends/dvidocument.atril-backend | |
364 | %endif | |
365 | ||
366 | %if %{with epub} | |
367 | %files backend-epub | |
368 | %defattr(644,root,root,755) | |
369 | %attr(755,root,root) %{_libdir}/atril/3/backends/libepubdocument.so | |
370 | %{_libdir}/atril/3/backends/epubdocument.atril-backend | |
371 | %endif | |
372 | ||
373 | %files backend-pdf | |
374 | %defattr(644,root,root,755) | |
375 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpdfdocument.so | |
376 | %{_libdir}/atril/3/backends/pdfdocument.atril-backend | |
377 | ||
378 | %if %{with ps} | |
379 | %files backend-ps | |
380 | %defattr(644,root,root,755) | |
381 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpsdocument.so | |
382 | %{_libdir}/atril/3/backends/psdocument.atril-backend | |
383 | %endif | |
384 | ||
385 | %if %{with xps} | |
386 | %files backend-xps | |
387 | %defattr(644,root,root,755) | |
388 | %attr(755,root,root) %{_libdir}/atril/3/backends/libxpsdocument.so | |
389 | %{_libdir}/atril/3/backends/xpsdocument.atril-backend | |
390 | %endif | |
391 | ||
392 | %if %{with caja} | |
393 | %files -n caja-extension-atril | |
394 | %defattr(644,root,root,755) | |
395 | %attr(755,root,root) %{_libdir}/caja/extensions-2.0/libatril-properties-page.so | |
396 | %{_datadir}/caja/extensions/libatril-properties-page.caja-extension | |
397 | %endif |