]>
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 |
9e71caa6 JB |
9 | %bcond_with gtk3 # use GTK+ 3.x instead of 2.x |
10 | ||
11 | Summary: Atril - MATE Desktop document viewer for multiple document formats | |
12 | Summary(pl.UTF-8): Atril - przeglądarka dokumentów w wielu formatach dla środowiska MATE | |
f2e5a072 | 13 | Name: atril |
f69d401f JB |
14 | Version: 1.10.0 |
15 | Release: 1 | |
9e71caa6 JB |
16 | License: GPL v2+ |
17 | Group: X11/Applications/Graphics | |
f69d401f JB |
18 | Source0: http://pub.mate-desktop.org/releases/1.10/%{name}-%{version}.tar.xz |
19 | # Source0-md5: 7f313068db354eee9e7282b9d0994e18 | |
9e71caa6 JB |
20 | URL: http://mate-desktop.org/ |
21 | BuildRequires: autoconf >= 2.57 | |
22 | BuildRequires: automake >= 1:1.10 | |
23 | BuildRequires: cairo-devel >= 1.10.0 | |
f2e5a072 | 24 | %{?with_caja:BuildRequires: caja-devel} |
9e71caa6 JB |
25 | BuildRequires: djvulibre-devel >= 3.5.17 |
26 | BuildRequires: docbook-dtd412-xml | |
f5635898 | 27 | BuildRequires: gettext-tools >= 0.10.40 |
f69d401f | 28 | BuildRequires: glib2-devel >= 1:2.36.0 |
9e71caa6 | 29 | BuildRequires: gobject-introspection-devel >= 0.6 |
f2e5a072 | 30 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.24.0} |
9e71caa6 JB |
31 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} |
32 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.13} | |
f69d401f JB |
33 | %{!?with_gtk3:BuildRequires: gtk-webkit-devel >= 2.4.3} |
34 | %{?with_gtk3:BuildRequires: gtk-webkit3-devel >= 2.4.3} | |
9e71caa6 JB |
35 | BuildRequires: intltool >= 0.35.0 |
36 | BuildRequires: kpathsea-devel | |
37 | BuildRequires: libgxps-devel >= 0.0.1 | |
f2e5a072 | 38 | BuildRequires: libsecret-devel >= 0.15 |
9e71caa6 | 39 | BuildRequires: libspectre-devel >= 0.2.0 |
f2e5a072 | 40 | BuildRequires: libtiff-devel >= 3.6 |
9e71caa6 JB |
41 | BuildRequires: libtool >= 1:1.4.3 |
42 | BuildRequires: libxml2-devel >= 1:2.5.0 | |
43 | BuildRequires: mate-common | |
f69d401f | 44 | BuildRequires: mate-desktop-devel >= 1.9.0 |
9e71caa6 JB |
45 | BuildRequires: mate-icon-theme-devel >= 1.1.0 |
46 | BuildRequires: pkgconfig | |
f69d401f | 47 | BuildRequires: poppler-glib-devel >= 0.16.0 |
c4f6a93a | 48 | BuildRequires: rpmbuild(find_lang) >= 1.36 |
9e71caa6 | 49 | BuildRequires: rpmbuild(macros) >= 1.592 |
9e71caa6 JB |
50 | BuildRequires: t1lib-devel |
51 | BuildRequires: tar >= 1:1.22 | |
52 | BuildRequires: xorg-lib-libSM-devel >= 1.0.0 | |
53 | BuildRequires: xorg-lib-libX11-devel | |
54 | BuildRequires: xz | |
f2e5a072 | 55 | BuildRequires: yelp-tools |
9e71caa6 JB |
56 | BuildRequires: zlib-devel |
57 | Requires(post,postun): desktop-file-utils | |
f69d401f | 58 | Requires(post,postun): glib2 >= 1:2.36.0 |
9e71caa6 JB |
59 | Requires(post,postun): gtk-update-icon-cache |
60 | Requires(post,postun): hicolor-icon-theme | |
9e71caa6 | 61 | Requires: %{name}-libs = %{version}-%{release} |
910de732 | 62 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.24.0} |
9e71caa6 | 63 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} |
910de732 JB |
64 | Requires: libsecret >= 0.15 |
65 | Requires: libxml2 >= 1:2.5.0 | |
f69d401f | 66 | Requires: mate-desktop-libs >= 1.9.0 |
910de732 | 67 | Requires: mate-icon-theme >= 1.1.0 |
9e71caa6 | 68 | Requires: xorg-lib-libSM >= 1.0.0 |
f2e5a072 JP |
69 | Suggests: atril-backend-djvu |
70 | Suggests: atril-backend-dvi | |
71 | Suggests: atril-backend-pdf | |
72 | Suggests: atril-backend-ps | |
73 | Suggests: atril-backend-xps | |
9e71caa6 JB |
74 | %{!?with_gtk3:Suggests: gtk+2-cups} |
75 | %{?with_gtk3:Suggests: gtk+3-cups} | |
76 | # sr@Latn vs. sr@latin | |
f2e5a072 | 77 | Obsoletes: mate-document-viewer |
9e71caa6 JB |
78 | Conflicts: glibc-misc < 6:2.7 |
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 | |
f69d401f JB |
95 | Requires: cairo >= 1.10.0 |
96 | Requires: glib2 >= 1:2.36.0 | |
910de732 | 97 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.24.0} |
9e71caa6 | 98 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} |
f2e5a072 | 99 | Obsoletes: mate-document-viewer-libs |
9e71caa6 JB |
100 | |
101 | %description libs | |
102 | Atril shared libraries. | |
103 | ||
104 | %description libs -l pl.UTF-8 | |
105 | Biblioteki współdzielone przeglądarki Atril. | |
106 | ||
107 | %package devel | |
108 | Summary: Header files for Atril libraries | |
109 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek przeglądarki Atril | |
110 | Group: X11/Development/Libraries | |
111 | Requires: %{name}-libs = %{version}-%{release} | |
f69d401f | 112 | Requires: glib2-devel >= 1:2.36.0 |
910de732 | 113 | %{!?with_gtk3:Requires: gtk+2-devel >= 2:2.24.0} |
9e71caa6 | 114 | %{?with_gtk3:Requires: gtk+3-devel >= 3.0.0} |
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 ER |
129 | %if "%{_rpmversion}" >= "5" |
130 | BuildArch: noarch | |
131 | %endif | |
9e71caa6 JB |
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 | |
f2e5a072 | 145 | Obsoletes: mate-document-viewer-backend-djvu |
9e71caa6 JB |
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} | |
f2e5a072 | 158 | Obsoletes: mate-document-viewer-backend-dvi |
9e71caa6 JB |
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 | ||
f69d401f JB |
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 | %if %{with gtk3} | |
173 | Requires: gtk-webkit3 >= 2.4.3 | |
174 | %else | |
175 | Requires: gtk-webkit >= 2.4.3 | |
176 | %endif | |
177 | ||
178 | %description backend-epub | |
179 | View ePub documents with Atril. | |
180 | ||
181 | %description backend-epub -l pl.UTF-8 | |
182 | Przeglądanie dokumentów ePub w przeglądarce Atril. | |
183 | ||
9e71caa6 JB |
184 | %package backend-pdf |
185 | Summary: View PDF documents with Atril | |
186 | Summary(pl.UTF-8): Przeglądanie dokumentów PDF w przeglądarce Atril | |
187 | Group: X11/Applications | |
188 | Requires: %{name} = %{version}-%{release} | |
f69d401f | 189 | Requires: poppler-glib >= 0.16.0 |
f2e5a072 | 190 | Obsoletes: mate-document-viewer-backend-pdf |
9e71caa6 JB |
191 | |
192 | %description backend-pdf | |
193 | View PDF documents with Atril. | |
194 | ||
195 | %description backend-pdf -l pl.UTF-8 | |
196 | Przeglądanie dokumentów PDF w przeglądarce Atril. | |
197 | ||
198 | %package backend-ps | |
199 | Summary: View PostScript documents with Atril | |
200 | Summary(pl.UTF-8): Przeglądanie dokumentów PostScript w przeglądarce Atril | |
201 | Group: X11/Applications | |
202 | Requires: %{name} = %{version}-%{release} | |
203 | Requires: libspectre >= 0.2.0 | |
f2e5a072 | 204 | Obsoletes: mate-document-viewer-backend-ps |
9e71caa6 JB |
205 | |
206 | %description backend-ps | |
207 | View PostScript documents with Atril. | |
208 | ||
209 | %description backend-ps -l pl.UTF-8 | |
210 | Przeglądanie dokumentów PostScript w przeglądarce Atril. | |
211 | ||
212 | %package backend-xps | |
213 | Summary: View XPS documents with Atril | |
214 | Summary(pl.UTF-8): Przeglądanie dokumentów XPS w przeglądarce Atril | |
215 | Group: X11/Applications | |
216 | Requires: %{name} = %{version}-%{release} | |
217 | Requires: libgxps >= 0.0.1 | |
f2e5a072 | 218 | Obsoletes: mate-document-viewer-backend-xps |
9e71caa6 JB |
219 | |
220 | %description backend-xps | |
221 | View XPS documents with Atril. | |
222 | ||
223 | %description backend-xps -l pl.UTF-8 | |
224 | Przeglądanie dokumentów XPS w przeglądarce Atril. | |
225 | ||
f2e5a072 | 226 | %package -n caja-extension-atril |
9e71caa6 JB |
227 | Summary: Atril extension for Caja file manager |
228 | Summary(pl.UTF-8): Rozszerzenie Atril dla zarządcy plików Caja | |
229 | Group: X11/Applications | |
230 | Requires: %{name} = %{version}-%{release} | |
f2e5a072 JP |
231 | Requires: caja |
232 | Obsoletes: mate-file-manager-extension-atril | |
9e71caa6 | 233 | |
f2e5a072 | 234 | %description -n caja-extension-atril |
9e71caa6 JB |
235 | Shows Atril document properties in Caja file manager. |
236 | ||
f2e5a072 | 237 | %description -n caja-extension-atril -l pl.UTF-8 |
9e71caa6 JB |
238 | Pokazuje właściwości dokumentu przeglądarki Atril w zarządcy plików |
239 | Caja. | |
240 | ||
241 | %prep | |
242 | %setup -q | |
243 | ||
244 | %build | |
245 | %{__gtkdocize} | |
246 | %{__intltoolize} | |
247 | %{__libtoolize} | |
248 | %{__aclocal} -I m4 | |
249 | %{__autoconf} | |
250 | %{__autoheader} | |
251 | %{__automake} | |
252 | %configure \ | |
253 | %{!?with_caja:--disable-caja} \ | |
254 | --enable-comics \ | |
255 | --enable-djvu \ | |
256 | --enable-dvi \ | |
257 | %{?with_apidocs:--enable-gtk-doc} \ | |
258 | --enable-introspection \ | |
259 | --enable-t1lib \ | |
260 | --enable-pdf \ | |
261 | --enable-pixbuf \ | |
262 | --disable-silent-rules \ | |
263 | --disable-static \ | |
264 | --enable-tiff \ | |
265 | %{?with_gtk3:--with-gtk=3.0} \ | |
266 | --with-html-dir=%{_gtkdocdir} | |
267 | %{__make} | |
268 | ||
269 | %install | |
270 | rm -rf $RPM_BUILD_ROOT | |
271 | ||
272 | %{__make} install \ | |
273 | DESTDIR=$RPM_BUILD_ROOT | |
274 | ||
275 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libatril*.la | |
276 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/atril/3/backends/*.la | |
277 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/caja/extensions-2.0/*.la | |
278 | ||
279 | # mate < 1.5 did not exist in pld, avoid dependency on mate-conf | |
280 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/MateConf/gsettings/atril.convert | |
281 | ||
910de732 | 282 | %find_lang atril --with-mate |
9e71caa6 JB |
283 | |
284 | %clean | |
285 | rm -rf $RPM_BUILD_ROOT | |
286 | ||
287 | %post | |
288 | %update_desktop_database_post | |
9e71caa6 JB |
289 | %update_icon_cache hicolor |
290 | %glib_compile_schemas | |
291 | ||
292 | %postun | |
293 | %update_desktop_database_postun | |
9e71caa6 JB |
294 | %update_icon_cache hicolor |
295 | %glib_compile_schemas | |
296 | ||
297 | %post libs -p /sbin/ldconfig | |
298 | %postun libs -p /sbin/ldconfig | |
299 | ||
300 | %files -f atril.lang | |
301 | %defattr(644,root,root,755) | |
302 | %doc AUTHORS ChangeLog NEWS README TODO | |
303 | %attr(755,root,root) %{_bindir}/atril | |
304 | %attr(755,root,root) %{_bindir}/atril-previewer | |
305 | %attr(755,root,root) %{_bindir}/atril-thumbnailer | |
306 | %attr(755,root,root) %{_libexecdir}/atril-convert-metadata | |
307 | %attr(755,root,root) %{_libexecdir}/atrild | |
308 | %dir %{_libdir}/atril | |
309 | %dir %{_libdir}/atril/3 | |
310 | %dir %{_libdir}/atril/3/backends | |
311 | %attr(755,root,root) %{_libdir}/atril/3/backends/libcomicsdocument.so | |
312 | %{_libdir}/atril/3/backends/comicsdocument.atril-backend | |
313 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpixbufdocument.so | |
314 | %{_libdir}/atril/3/backends/pixbufdocument.atril-backend | |
315 | %attr(755,root,root) %{_libdir}/atril/3/backends/libtiffdocument.so | |
316 | %{_libdir}/atril/3/backends/tiffdocument.atril-backend | |
f69d401f JB |
317 | %{_datadir}/atril |
318 | %{_datadir}/appdata/atril.appdata.xml | |
9e71caa6 JB |
319 | %{_datadir}/dbus-1/services/org.mate.atril.Daemon.service |
320 | %{_datadir}/glib-2.0/schemas/org.mate.Atril.gschema.xml | |
9e71caa6 JB |
321 | %{_datadir}/thumbnailers/atril.thumbnailer |
322 | %{_mandir}/man1/atril.1* | |
323 | %{_mandir}/man1/atril-previewer.1* | |
324 | %{_mandir}/man1/atril-thumbnailer.1* | |
325 | %{_desktopdir}/atril.desktop | |
326 | %{_iconsdir}/hicolor/*x*/apps/atril.png | |
327 | %{_iconsdir}/hicolor/scalable/apps/atril.svg | |
328 | ||
329 | %files libs | |
330 | %defattr(644,root,root,755) | |
331 | %attr(755,root,root) %{_libdir}/libatrildocument.so.*.*.* | |
332 | %attr(755,root,root) %ghost %{_libdir}/libatrildocument.so.3 | |
333 | %attr(755,root,root) %{_libdir}/libatrilview.so.*.*.* | |
334 | %attr(755,root,root) %ghost %{_libdir}/libatrilview.so.3 | |
335 | %{_libdir}/girepository-1.0/AtrilDocument-1.5.0.typelib | |
336 | %{_libdir}/girepository-1.0/AtrilView-1.5.0.typelib | |
337 | ||
338 | %files devel | |
339 | %defattr(644,root,root,755) | |
340 | %attr(755,root,root) %{_libdir}/libatrildocument.so | |
341 | %attr(755,root,root) %{_libdir}/libatrilview.so | |
342 | %{_datadir}/gir-1.0/AtrilDocument-1.5.0.gir | |
343 | %{_datadir}/gir-1.0/AtrilView-1.5.0.gir | |
344 | %{_includedir}/atril | |
345 | %{_pkgconfigdir}/atril-document-1.5.0.pc | |
346 | %{_pkgconfigdir}/atril-view-1.5.0.pc | |
347 | ||
348 | %if %{with apidocs} | |
349 | %files apidocs | |
350 | %defattr(644,root,root,755) | |
351 | %{_gtkdocdir}/atril | |
352 | %{_gtkdocdir}/libatrildocument-1.5.0 | |
353 | %{_gtkdocdir}/libatrilview-1.5.0 | |
354 | %endif | |
355 | ||
356 | %files backend-djvu | |
357 | %defattr(644,root,root,755) | |
358 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdjvudocument.so | |
359 | %{_libdir}/atril/3/backends/djvudocument.atril-backend | |
360 | ||
361 | %files backend-dvi | |
362 | %defattr(644,root,root,755) | |
363 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdvidocument.so | |
364 | %{_libdir}/atril/3/backends/dvidocument.atril-backend | |
365 | ||
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 | |
370 | %{_libdir}/atril/3/backends/epub | |
371 | ||
9e71caa6 JB |
372 | %files backend-ps |
373 | %defattr(644,root,root,755) | |
374 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpsdocument.so | |
375 | %{_libdir}/atril/3/backends/psdocument.atril-backend | |
376 | ||
377 | %files backend-pdf | |
378 | %defattr(644,root,root,755) | |
379 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpdfdocument.so | |
380 | %{_libdir}/atril/3/backends/pdfdocument.atril-backend | |
381 | ||
382 | %files backend-xps | |
383 | %defattr(644,root,root,755) | |
384 | %attr(755,root,root) %{_libdir}/atril/3/backends/libxpsdocument.so | |
385 | %{_libdir}/atril/3/backends/xpsdocument.atril-backend | |
386 | ||
387 | %if %{with caja} | |
f2e5a072 | 388 | %files -n caja-extension-atril |
9e71caa6 JB |
389 | %defattr(644,root,root,755) |
390 | %attr(755,root,root) %{_libdir}/caja/extensions-2.0/libatril-properties-page.so | |
f69d401f | 391 | %{_datadir}/caja/extensions/libatril-properties-page.caja-extension |
9e71caa6 | 392 | %endif |