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