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