]>
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 |
84827586 | 14 | Version: 1.16.0 |
f69d401f | 15 | Release: 1 |
9e71caa6 JB |
16 | License: GPL v2+ |
17 | Group: X11/Applications/Graphics | |
84827586 JP |
18 | Source0: http://pub.mate-desktop.org/releases/1.16/%{name}-%{version}.tar.xz |
19 | # Source0-md5: a818e8bb191aee6af5274167b973d6b1 | |
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 | 33 | %{!?with_gtk3:BuildRequires: gtk-webkit-devel >= 2.4.3} |
d34c4e44 | 34 | %{?with_gtk3:BuildRequires: gtk-webkit4-devel >= 2.4.3} |
7deba439 | 35 | BuildRequires: intltool >= 0.50.1 |
9e71caa6 | 36 | BuildRequires: kpathsea-devel |
f10076d9 | 37 | BuildRequires: libgxps-devel >= 0.2.0 |
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 | |
9e71caa6 | 44 | BuildRequires: pkgconfig |
84827586 | 45 | BuildRequires: poppler-glib-devel >= 0.18.0 |
c4f6a93a | 46 | BuildRequires: rpmbuild(find_lang) >= 1.36 |
9e71caa6 | 47 | BuildRequires: rpmbuild(macros) >= 1.592 |
9e71caa6 JB |
48 | BuildRequires: t1lib-devel |
49 | BuildRequires: tar >= 1:1.22 | |
50 | BuildRequires: xorg-lib-libSM-devel >= 1.0.0 | |
51 | BuildRequires: xorg-lib-libX11-devel | |
52 | BuildRequires: xz | |
f2e5a072 | 53 | BuildRequires: yelp-tools |
9e71caa6 JB |
54 | BuildRequires: zlib-devel |
55 | Requires(post,postun): desktop-file-utils | |
f69d401f | 56 | Requires(post,postun): glib2 >= 1:2.36.0 |
9e71caa6 JB |
57 | Requires(post,postun): gtk-update-icon-cache |
58 | Requires(post,postun): hicolor-icon-theme | |
9e71caa6 | 59 | Requires: %{name}-libs = %{version}-%{release} |
910de732 | 60 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.24.0} |
9e71caa6 | 61 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} |
910de732 JB |
62 | Requires: libsecret >= 0.15 |
63 | Requires: libxml2 >= 1:2.5.0 | |
9e71caa6 | 64 | Requires: xorg-lib-libSM >= 1.0.0 |
f2e5a072 JP |
65 | Suggests: atril-backend-djvu |
66 | Suggests: atril-backend-dvi | |
67 | Suggests: atril-backend-pdf | |
68 | Suggests: atril-backend-ps | |
69 | Suggests: atril-backend-xps | |
9e71caa6 JB |
70 | %{!?with_gtk3:Suggests: gtk+2-cups} |
71 | %{?with_gtk3:Suggests: gtk+3-cups} | |
72 | # sr@Latn vs. sr@latin | |
f2e5a072 | 73 | Obsoletes: mate-document-viewer |
9e71caa6 JB |
74 | Conflicts: glibc-misc < 6:2.7 |
75 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
76 | ||
f2e5a072 | 77 | %define backendsdir %{_libdir}/atril/3/backends |
9e71caa6 JB |
78 | |
79 | %description | |
80 | Atril is a document viewer for multiple document formats like PDF and | |
81 | PostScript. Atril is a fork of Evince. | |
82 | ||
83 | %description -l pl.UTF-8 | |
84 | Atril jest przeglądarką dokumentów w wielu formatach takich jak PDF | |
85 | czy PostScript. Jest to odgałęzienie pakietu Evince. | |
86 | ||
87 | %package libs | |
88 | Summary: Atril shared libraries | |
89 | Summary(pl.UTF-8): Biblioteki współdzielone przeglądarki Atril | |
90 | Group: X11/Libraries | |
f69d401f JB |
91 | Requires: cairo >= 1.10.0 |
92 | Requires: glib2 >= 1:2.36.0 | |
910de732 | 93 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.24.0} |
9e71caa6 | 94 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} |
f2e5a072 | 95 | Obsoletes: mate-document-viewer-libs |
9e71caa6 JB |
96 | |
97 | %description libs | |
98 | Atril shared libraries. | |
99 | ||
100 | %description libs -l pl.UTF-8 | |
101 | Biblioteki współdzielone przeglądarki Atril. | |
102 | ||
103 | %package devel | |
104 | Summary: Header files for Atril libraries | |
105 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek przeglądarki Atril | |
106 | Group: X11/Development/Libraries | |
107 | Requires: %{name}-libs = %{version}-%{release} | |
f69d401f | 108 | Requires: glib2-devel >= 1:2.36.0 |
910de732 | 109 | %{!?with_gtk3:Requires: gtk+2-devel >= 2:2.24.0} |
9e71caa6 | 110 | %{?with_gtk3:Requires: gtk+3-devel >= 3.0.0} |
f2e5a072 | 111 | Obsoletes: mate-document-viewer-devel |
9e71caa6 JB |
112 | |
113 | %description devel | |
114 | Header files for Atril libraries. | |
115 | ||
116 | %description devel -l pl.UTF-8 | |
117 | Pliki nagłówkowe bibliotek przeglądarki Atril. | |
118 | ||
119 | %package apidocs | |
120 | Summary: Atril API documentation | |
121 | Summary(pl.UTF-8): Dokumentacja API aplikacji Atril | |
122 | Group: Documentation | |
123 | Requires: gtk-doc-common | |
f2e5a072 | 124 | Obsoletes: mate-document-viewer-apidocs |
76153e0c ER |
125 | %if "%{_rpmversion}" >= "5" |
126 | BuildArch: noarch | |
127 | %endif | |
9e71caa6 JB |
128 | |
129 | %description apidocs | |
130 | Atril API documentation. | |
131 | ||
132 | %description apidocs -l pl.UTF-8 | |
133 | Dokumentacja API aplikacji Atril. | |
134 | ||
135 | %package backend-djvu | |
136 | Summary: View DJVu documents with Atril | |
137 | Summary(pl.UTF-8): Przeglądanie dokumentów DjVu w przeglądarce Atril | |
138 | Group: X11/Applications | |
139 | Requires: %{name} = %{version}-%{release} | |
140 | Requires: djvulibre >= 3.5.17 | |
f2e5a072 | 141 | Obsoletes: mate-document-viewer-backend-djvu |
9e71caa6 JB |
142 | |
143 | %description backend-djvu | |
144 | View DJVu documents with Atril. | |
145 | ||
146 | %description backend-djvu -l pl.UTF-8 | |
147 | Przeglądanie dokumentów DjVu w przeglądarce Atril. | |
148 | ||
149 | %package backend-dvi | |
150 | Summary: View DVI documents with Atril | |
151 | Summary(pl.UTF-8): Przeglądanie dokumentów DVI w przeglądarce Atril | |
152 | Group: X11/Applications | |
153 | Requires: %{name} = %{version}-%{release} | |
f2e5a072 | 154 | Obsoletes: mate-document-viewer-backend-dvi |
9e71caa6 JB |
155 | |
156 | %description backend-dvi | |
157 | View DVI documents with Atril. | |
158 | ||
159 | %description backend-dvi -l pl.UTF-8 | |
160 | Przeglądanie dokumentów DVI w przeglądarce Atril. | |
161 | ||
f69d401f JB |
162 | %package backend-epub |
163 | Summary: View ePub documents with Atril | |
164 | Summary(pl.UTF-8): Przeglądanie dokumentów ePub w przeglądarce Atril | |
165 | Group: X11/Applications | |
166 | Requires: %{name} = %{version}-%{release} | |
167 | Requires: libxml2 >= 1:2.5.0 | |
168 | %if %{with gtk3} | |
d34c4e44 | 169 | Requires: gtk-webkit4 >= 2.4.3 |
f69d401f JB |
170 | %else |
171 | Requires: gtk-webkit >= 2.4.3 | |
172 | %endif | |
173 | ||
174 | %description backend-epub | |
175 | View ePub documents with Atril. | |
176 | ||
177 | %description backend-epub -l pl.UTF-8 | |
178 | Przeglądanie dokumentów ePub w przeglądarce Atril. | |
179 | ||
9e71caa6 JB |
180 | %package backend-pdf |
181 | Summary: View PDF documents with Atril | |
182 | Summary(pl.UTF-8): Przeglądanie dokumentów PDF w przeglądarce Atril | |
183 | Group: X11/Applications | |
184 | Requires: %{name} = %{version}-%{release} | |
f69d401f | 185 | Requires: poppler-glib >= 0.16.0 |
f2e5a072 | 186 | Obsoletes: mate-document-viewer-backend-pdf |
9e71caa6 JB |
187 | |
188 | %description backend-pdf | |
189 | View PDF documents with Atril. | |
190 | ||
191 | %description backend-pdf -l pl.UTF-8 | |
192 | Przeglądanie dokumentów PDF w przeglądarce Atril. | |
193 | ||
194 | %package backend-ps | |
195 | Summary: View PostScript documents with Atril | |
196 | Summary(pl.UTF-8): Przeglądanie dokumentów PostScript w przeglądarce Atril | |
197 | Group: X11/Applications | |
198 | Requires: %{name} = %{version}-%{release} | |
199 | Requires: libspectre >= 0.2.0 | |
f2e5a072 | 200 | Obsoletes: mate-document-viewer-backend-ps |
9e71caa6 JB |
201 | |
202 | %description backend-ps | |
203 | View PostScript documents with Atril. | |
204 | ||
205 | %description backend-ps -l pl.UTF-8 | |
206 | Przeglądanie dokumentów PostScript w przeglądarce Atril. | |
207 | ||
208 | %package backend-xps | |
209 | Summary: View XPS documents with Atril | |
210 | Summary(pl.UTF-8): Przeglądanie dokumentów XPS w przeglądarce Atril | |
211 | Group: X11/Applications | |
212 | Requires: %{name} = %{version}-%{release} | |
f10076d9 | 213 | Requires: libgxps >= 0.2.0 |
f2e5a072 | 214 | Obsoletes: mate-document-viewer-backend-xps |
9e71caa6 JB |
215 | |
216 | %description backend-xps | |
217 | View XPS documents with Atril. | |
218 | ||
219 | %description backend-xps -l pl.UTF-8 | |
220 | Przeglądanie dokumentów XPS w przeglądarce Atril. | |
221 | ||
f2e5a072 | 222 | %package -n caja-extension-atril |
9e71caa6 JB |
223 | Summary: Atril extension for Caja file manager |
224 | Summary(pl.UTF-8): Rozszerzenie Atril dla zarządcy plików Caja | |
225 | Group: X11/Applications | |
226 | Requires: %{name} = %{version}-%{release} | |
f2e5a072 JP |
227 | Requires: caja |
228 | Obsoletes: mate-file-manager-extension-atril | |
9e71caa6 | 229 | |
f2e5a072 | 230 | %description -n caja-extension-atril |
9e71caa6 JB |
231 | Shows Atril document properties in Caja file manager. |
232 | ||
f2e5a072 | 233 | %description -n caja-extension-atril -l pl.UTF-8 |
9e71caa6 JB |
234 | Pokazuje właściwości dokumentu przeglądarki Atril w zarządcy plików |
235 | Caja. | |
236 | ||
237 | %prep | |
238 | %setup -q | |
239 | ||
240 | %build | |
241 | %{__gtkdocize} | |
242 | %{__intltoolize} | |
243 | %{__libtoolize} | |
244 | %{__aclocal} -I m4 | |
245 | %{__autoconf} | |
246 | %{__autoheader} | |
247 | %{__automake} | |
248 | %configure \ | |
249 | %{!?with_caja:--disable-caja} \ | |
250 | --enable-comics \ | |
251 | --enable-djvu \ | |
252 | --enable-dvi \ | |
253 | %{?with_apidocs:--enable-gtk-doc} \ | |
254 | --enable-introspection \ | |
255 | --enable-t1lib \ | |
256 | --enable-pdf \ | |
257 | --enable-pixbuf \ | |
258 | --disable-silent-rules \ | |
259 | --disable-static \ | |
260 | --enable-tiff \ | |
261 | %{?with_gtk3:--with-gtk=3.0} \ | |
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 | |
84827586 | 274 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{frp,jv,pms} |
9e71caa6 | 275 | |
910de732 | 276 | %find_lang atril --with-mate |
9e71caa6 JB |
277 | |
278 | %clean | |
279 | rm -rf $RPM_BUILD_ROOT | |
280 | ||
281 | %post | |
282 | %update_desktop_database_post | |
9e71caa6 JB |
283 | %update_icon_cache hicolor |
284 | %glib_compile_schemas | |
285 | ||
286 | %postun | |
287 | %update_desktop_database_postun | |
9e71caa6 JB |
288 | %update_icon_cache hicolor |
289 | %glib_compile_schemas | |
290 | ||
291 | %post libs -p /sbin/ldconfig | |
292 | %postun libs -p /sbin/ldconfig | |
293 | ||
294 | %files -f atril.lang | |
295 | %defattr(644,root,root,755) | |
84827586 | 296 | %doc AUTHORS ChangeLog NEWS README |
9e71caa6 JB |
297 | %attr(755,root,root) %{_bindir}/atril |
298 | %attr(755,root,root) %{_bindir}/atril-previewer | |
299 | %attr(755,root,root) %{_bindir}/atril-thumbnailer | |
300 | %attr(755,root,root) %{_libexecdir}/atril-convert-metadata | |
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 JB |
311 | %{_datadir}/atril |
312 | %{_datadir}/appdata/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 | ||
350 | %files backend-djvu | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdjvudocument.so | |
353 | %{_libdir}/atril/3/backends/djvudocument.atril-backend | |
354 | ||
355 | %files backend-dvi | |
356 | %defattr(644,root,root,755) | |
357 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdvidocument.so | |
358 | %{_libdir}/atril/3/backends/dvidocument.atril-backend | |
359 | ||
f69d401f JB |
360 | %files backend-epub |
361 | %defattr(644,root,root,755) | |
362 | %attr(755,root,root) %{_libdir}/atril/3/backends/libepubdocument.so | |
363 | %{_libdir}/atril/3/backends/epubdocument.atril-backend | |
f69d401f | 364 | |
9e71caa6 JB |
365 | %files backend-ps |
366 | %defattr(644,root,root,755) | |
367 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpsdocument.so | |
368 | %{_libdir}/atril/3/backends/psdocument.atril-backend | |
369 | ||
370 | %files backend-pdf | |
371 | %defattr(644,root,root,755) | |
372 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpdfdocument.so | |
373 | %{_libdir}/atril/3/backends/pdfdocument.atril-backend | |
374 | ||
375 | %files backend-xps | |
376 | %defattr(644,root,root,755) | |
377 | %attr(755,root,root) %{_libdir}/atril/3/backends/libxpsdocument.so | |
378 | %{_libdir}/atril/3/backends/xpsdocument.atril-backend | |
379 | ||
380 | %if %{with caja} | |
f2e5a072 | 381 | %files -n caja-extension-atril |
9e71caa6 JB |
382 | %defattr(644,root,root,755) |
383 | %attr(755,root,root) %{_libdir}/caja/extensions-2.0/libatril-properties-page.so | |
f69d401f | 384 | %{_datadir}/caja/extensions/libatril-properties-page.caja-extension |
9e71caa6 | 385 | %endif |