]>
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 | |
8 | %bcond_without caja # Caja (mate-file-manager) plugin | |
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 | |
13 | Name: mate-document-viewer | |
14 | Version: 1.6.1 | |
15 | Release: 1 | |
16 | License: GPL v2+ | |
17 | Group: X11/Applications/Graphics | |
18 | Source0: http://pub.mate-desktop.org/releases/1.6/%{name}-%{version}.tar.xz | |
19 | # Source0-md5: 43b48465f51934421e2d63be42769689 | |
20 | URL: http://mate-desktop.org/ | |
21 | BuildRequires: autoconf >= 2.57 | |
22 | BuildRequires: automake >= 1:1.10 | |
23 | BuildRequires: cairo-devel >= 1.10.0 | |
24 | BuildRequires: djvulibre-devel >= 3.5.17 | |
25 | BuildRequires: docbook-dtd412-xml | |
26 | BuildRequires: gettext-devel >= 0.10.40 | |
27 | BuildRequires: glib2-devel >= 1:2.26.0 | |
28 | BuildRequires: gobject-introspection-devel >= 0.6 | |
29 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.22.0} | |
30 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} | |
31 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.13} | |
32 | BuildRequires: intltool >= 0.35.0 | |
33 | BuildRequires: kpathsea-devel | |
34 | BuildRequires: libgxps-devel >= 0.0.1 | |
35 | BuildRequires: libmatekeyring-devel >= 1.1.0 | |
36 | BuildRequires: libspectre-devel >= 0.2.0 | |
37 | BuildRequires: libtiff-devel | |
38 | BuildRequires: libtool >= 1:1.4.3 | |
39 | BuildRequires: libxml2-devel >= 1:2.5.0 | |
40 | BuildRequires: mate-common | |
41 | BuildRequires: mate-doc-utils | |
42 | %{?with_caja:BuildRequires: mate-file-manager-devel} | |
43 | BuildRequires: mate-icon-theme-devel >= 1.1.0 | |
44 | BuildRequires: pkgconfig | |
45 | BuildRequires: poppler-glib-devel >= 0.14.0 | |
46 | BuildRequires: rpmbuild(find_lang) >= 1.23 | |
47 | BuildRequires: rpmbuild(macros) >= 1.592 | |
48 | BuildRequires: scrollkeeper | |
49 | BuildRequires: t1lib-devel | |
50 | BuildRequires: tar >= 1:1.22 | |
51 | BuildRequires: xorg-lib-libSM-devel >= 1.0.0 | |
52 | BuildRequires: xorg-lib-libX11-devel | |
53 | BuildRequires: xz | |
54 | BuildRequires: zlib-devel | |
55 | Requires(post,postun): desktop-file-utils | |
56 | Requires(post,postun): glib2 >= 1:2.26.0 | |
57 | Requires(post,postun): gtk-update-icon-cache | |
58 | Requires(post,postun): hicolor-icon-theme | |
59 | Requires(post,postun): scrollkeeper | |
60 | Requires: %{name}-libs = %{version}-%{release} | |
61 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.22.0} | |
62 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
63 | Requires: xorg-lib-libSM >= 1.0.0 | |
64 | Suggests: mate-document-viewer-backend-djvu | |
65 | Suggests: mate-document-viewer-backend-dvi | |
66 | Suggests: mate-document-viewer-backend-pdf | |
67 | Suggests: mate-document-viewer-backend-ps | |
68 | Suggests: mate-document-viewer-backend-xps | |
69 | %{!?with_gtk3:Suggests: gtk+2-cups} | |
70 | %{?with_gtk3:Suggests: gtk+3-cups} | |
71 | # sr@Latn vs. sr@latin | |
72 | Conflicts: glibc-misc < 6:2.7 | |
73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
74 | ||
75 | %define backendsdir %{_libdir}/mate-document-viewer/3/backends | |
76 | ||
77 | %description | |
78 | Atril is a document viewer for multiple document formats like PDF and | |
79 | PostScript. Atril is a fork of Evince. | |
80 | ||
81 | %description -l pl.UTF-8 | |
82 | Atril jest przeglądarką dokumentów w wielu formatach takich jak PDF | |
83 | czy PostScript. Jest to odgałęzienie pakietu Evince. | |
84 | ||
85 | %package libs | |
86 | Summary: Atril shared libraries | |
87 | Summary(pl.UTF-8): Biblioteki współdzielone przeglądarki Atril | |
88 | Group: X11/Libraries | |
89 | Requires: glib2 >= 1:2.26.0 | |
90 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.22.0} | |
91 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
92 | ||
93 | %description libs | |
94 | Atril shared libraries. | |
95 | ||
96 | %description libs -l pl.UTF-8 | |
97 | Biblioteki współdzielone przeglądarki Atril. | |
98 | ||
99 | %package devel | |
100 | Summary: Header files for Atril libraries | |
101 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek przeglądarki Atril | |
102 | Group: X11/Development/Libraries | |
103 | Requires: %{name}-libs = %{version}-%{release} | |
104 | Requires: glib2-devel >= 1:2.26.0 | |
105 | %{!?with_gtk3:Requires: gtk+2-devel >= 2:2.22.0} | |
106 | %{?with_gtk3:Requires: gtk+3-devel >= 3.0.0} | |
107 | ||
108 | %description devel | |
109 | Header files for Atril libraries. | |
110 | ||
111 | %description devel -l pl.UTF-8 | |
112 | Pliki nagłówkowe bibliotek przeglądarki Atril. | |
113 | ||
114 | %package apidocs | |
115 | Summary: Atril API documentation | |
116 | Summary(pl.UTF-8): Dokumentacja API aplikacji Atril | |
117 | Group: Documentation | |
118 | Requires: gtk-doc-common | |
119 | ||
120 | %description apidocs | |
121 | Atril API documentation. | |
122 | ||
123 | %description apidocs -l pl.UTF-8 | |
124 | Dokumentacja API aplikacji Atril. | |
125 | ||
126 | %package backend-djvu | |
127 | Summary: View DJVu documents with Atril | |
128 | Summary(pl.UTF-8): Przeglądanie dokumentów DjVu w przeglądarce Atril | |
129 | Group: X11/Applications | |
130 | Requires: %{name} = %{version}-%{release} | |
131 | Requires: djvulibre >= 3.5.17 | |
132 | ||
133 | %description backend-djvu | |
134 | View DJVu documents with Atril. | |
135 | ||
136 | %description backend-djvu -l pl.UTF-8 | |
137 | Przeglądanie dokumentów DjVu w przeglądarce Atril. | |
138 | ||
139 | %package backend-dvi | |
140 | Summary: View DVI documents with Atril | |
141 | Summary(pl.UTF-8): Przeglądanie dokumentów DVI w przeglądarce Atril | |
142 | Group: X11/Applications | |
143 | Requires: %{name} = %{version}-%{release} | |
144 | ||
145 | %description backend-dvi | |
146 | View DVI documents with Atril. | |
147 | ||
148 | %description backend-dvi -l pl.UTF-8 | |
149 | Przeglądanie dokumentów DVI w przeglądarce Atril. | |
150 | ||
151 | %package backend-pdf | |
152 | Summary: View PDF documents with Atril | |
153 | Summary(pl.UTF-8): Przeglądanie dokumentów PDF w przeglądarce Atril | |
154 | Group: X11/Applications | |
155 | Requires: %{name} = %{version}-%{release} | |
156 | Requires: poppler-glib >= 0.14.0 | |
157 | ||
158 | %description backend-pdf | |
159 | View PDF documents with Atril. | |
160 | ||
161 | %description backend-pdf -l pl.UTF-8 | |
162 | Przeglądanie dokumentów PDF w przeglądarce Atril. | |
163 | ||
164 | %package backend-ps | |
165 | Summary: View PostScript documents with Atril | |
166 | Summary(pl.UTF-8): Przeglądanie dokumentów PostScript w przeglądarce Atril | |
167 | Group: X11/Applications | |
168 | Requires: %{name} = %{version}-%{release} | |
169 | Requires: libspectre >= 0.2.0 | |
170 | ||
171 | %description backend-ps | |
172 | View PostScript documents with Atril. | |
173 | ||
174 | %description backend-ps -l pl.UTF-8 | |
175 | Przeglądanie dokumentów PostScript w przeglądarce Atril. | |
176 | ||
177 | %package backend-xps | |
178 | Summary: View XPS documents with Atril | |
179 | Summary(pl.UTF-8): Przeglądanie dokumentów XPS w przeglądarce Atril | |
180 | Group: X11/Applications | |
181 | Requires: %{name} = %{version}-%{release} | |
182 | Requires: libgxps >= 0.0.1 | |
183 | ||
184 | %description backend-xps | |
185 | View XPS documents with Atril. | |
186 | ||
187 | %description backend-xps -l pl.UTF-8 | |
188 | Przeglądanie dokumentów XPS w przeglądarce Atril. | |
189 | ||
190 | %package -n mate-file-manager-extension-atril | |
191 | Summary: Atril extension for Caja file manager | |
192 | Summary(pl.UTF-8): Rozszerzenie Atril dla zarządcy plików Caja | |
193 | Group: X11/Applications | |
194 | Requires: %{name} = %{version}-%{release} | |
195 | Requires: mate-file-manager | |
196 | ||
197 | %description -n mate-file-manager-extension-atril | |
198 | Shows Atril document properties in Caja file manager. | |
199 | ||
200 | %description -n mate-file-manager-extension-atril -l pl.UTF-8 | |
201 | Pokazuje właściwości dokumentu przeglądarki Atril w zarządcy plików | |
202 | Caja. | |
203 | ||
204 | %prep | |
205 | %setup -q | |
206 | ||
207 | %build | |
208 | %{__gtkdocize} | |
209 | %{__intltoolize} | |
210 | %{__libtoolize} | |
211 | %{__aclocal} -I m4 | |
212 | %{__autoconf} | |
213 | %{__autoheader} | |
214 | %{__automake} | |
215 | %configure \ | |
216 | %{!?with_caja:--disable-caja} \ | |
217 | --enable-comics \ | |
218 | --enable-djvu \ | |
219 | --enable-dvi \ | |
220 | %{?with_apidocs:--enable-gtk-doc} \ | |
221 | --enable-introspection \ | |
222 | --enable-t1lib \ | |
223 | --enable-pdf \ | |
224 | --enable-pixbuf \ | |
225 | --disable-silent-rules \ | |
226 | --disable-static \ | |
227 | --enable-tiff \ | |
228 | %{?with_gtk3:--with-gtk=3.0} \ | |
229 | --with-html-dir=%{_gtkdocdir} | |
230 | %{__make} | |
231 | ||
232 | %install | |
233 | rm -rf $RPM_BUILD_ROOT | |
234 | ||
235 | %{__make} install \ | |
236 | DESTDIR=$RPM_BUILD_ROOT | |
237 | ||
238 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libatril*.la | |
239 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/atril/3/backends/*.la | |
240 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/caja/extensions-2.0/*.la | |
241 | ||
242 | # mate < 1.5 did not exist in pld, avoid dependency on mate-conf | |
243 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/MateConf/gsettings/atril.convert | |
244 | ||
245 | %find_lang atril --with-mate --with-omf | |
246 | ||
247 | %clean | |
248 | rm -rf $RPM_BUILD_ROOT | |
249 | ||
250 | %post | |
251 | %update_desktop_database_post | |
252 | %scrollkeeper_update_post | |
253 | %update_icon_cache hicolor | |
254 | %glib_compile_schemas | |
255 | ||
256 | %postun | |
257 | %update_desktop_database_postun | |
258 | %scrollkeeper_update_postun | |
259 | %update_icon_cache hicolor | |
260 | %glib_compile_schemas | |
261 | ||
262 | %post libs -p /sbin/ldconfig | |
263 | %postun libs -p /sbin/ldconfig | |
264 | ||
265 | %files -f atril.lang | |
266 | %defattr(644,root,root,755) | |
267 | %doc AUTHORS ChangeLog NEWS README TODO | |
268 | %attr(755,root,root) %{_bindir}/atril | |
269 | %attr(755,root,root) %{_bindir}/atril-previewer | |
270 | %attr(755,root,root) %{_bindir}/atril-thumbnailer | |
271 | %attr(755,root,root) %{_libexecdir}/atril-convert-metadata | |
272 | %attr(755,root,root) %{_libexecdir}/atrild | |
273 | %dir %{_libdir}/atril | |
274 | %dir %{_libdir}/atril/3 | |
275 | %dir %{_libdir}/atril/3/backends | |
276 | %attr(755,root,root) %{_libdir}/atril/3/backends/libcomicsdocument.so | |
277 | %{_libdir}/atril/3/backends/comicsdocument.atril-backend | |
278 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpixbufdocument.so | |
279 | %{_libdir}/atril/3/backends/pixbufdocument.atril-backend | |
280 | %attr(755,root,root) %{_libdir}/atril/3/backends/libtiffdocument.so | |
281 | %{_libdir}/atril/3/backends/tiffdocument.atril-backend | |
282 | %{_datadir}/dbus-1/services/org.mate.atril.Daemon.service | |
283 | %{_datadir}/glib-2.0/schemas/org.mate.Atril.gschema.xml | |
284 | %{_datadir}/mate-document-viewer | |
285 | %{_datadir}/thumbnailers/atril.thumbnailer | |
286 | %{_mandir}/man1/atril.1* | |
287 | %{_mandir}/man1/atril-previewer.1* | |
288 | %{_mandir}/man1/atril-thumbnailer.1* | |
289 | %{_desktopdir}/atril.desktop | |
290 | %{_iconsdir}/hicolor/*x*/apps/atril.png | |
291 | %{_iconsdir}/hicolor/scalable/apps/atril.svg | |
292 | ||
293 | %files libs | |
294 | %defattr(644,root,root,755) | |
295 | %attr(755,root,root) %{_libdir}/libatrildocument.so.*.*.* | |
296 | %attr(755,root,root) %ghost %{_libdir}/libatrildocument.so.3 | |
297 | %attr(755,root,root) %{_libdir}/libatrilview.so.*.*.* | |
298 | %attr(755,root,root) %ghost %{_libdir}/libatrilview.so.3 | |
299 | %{_libdir}/girepository-1.0/AtrilDocument-1.5.0.typelib | |
300 | %{_libdir}/girepository-1.0/AtrilView-1.5.0.typelib | |
301 | ||
302 | %files devel | |
303 | %defattr(644,root,root,755) | |
304 | %attr(755,root,root) %{_libdir}/libatrildocument.so | |
305 | %attr(755,root,root) %{_libdir}/libatrilview.so | |
306 | %{_datadir}/gir-1.0/AtrilDocument-1.5.0.gir | |
307 | %{_datadir}/gir-1.0/AtrilView-1.5.0.gir | |
308 | %{_includedir}/atril | |
309 | %{_pkgconfigdir}/atril-document-1.5.0.pc | |
310 | %{_pkgconfigdir}/atril-view-1.5.0.pc | |
311 | ||
312 | %if %{with apidocs} | |
313 | %files apidocs | |
314 | %defattr(644,root,root,755) | |
315 | %{_gtkdocdir}/atril | |
316 | %{_gtkdocdir}/libatrildocument-1.5.0 | |
317 | %{_gtkdocdir}/libatrilview-1.5.0 | |
318 | %endif | |
319 | ||
320 | %files backend-djvu | |
321 | %defattr(644,root,root,755) | |
322 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdjvudocument.so | |
323 | %{_libdir}/atril/3/backends/djvudocument.atril-backend | |
324 | ||
325 | %files backend-dvi | |
326 | %defattr(644,root,root,755) | |
327 | %attr(755,root,root) %{_libdir}/atril/3/backends/libdvidocument.so | |
328 | %{_libdir}/atril/3/backends/dvidocument.atril-backend | |
329 | ||
330 | %files backend-ps | |
331 | %defattr(644,root,root,755) | |
332 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpsdocument.so | |
333 | %{_libdir}/atril/3/backends/psdocument.atril-backend | |
334 | ||
335 | %files backend-pdf | |
336 | %defattr(644,root,root,755) | |
337 | %attr(755,root,root) %{_libdir}/atril/3/backends/libpdfdocument.so | |
338 | %{_libdir}/atril/3/backends/pdfdocument.atril-backend | |
339 | ||
340 | %files backend-xps | |
341 | %defattr(644,root,root,755) | |
342 | %attr(755,root,root) %{_libdir}/atril/3/backends/libxpsdocument.so | |
343 | %{_libdir}/atril/3/backends/xpsdocument.atril-backend | |
344 | ||
345 | %if %{with caja} | |
346 | %files -n mate-file-manager-extension-atril | |
347 | %defattr(644,root,root,755) | |
348 | %attr(755,root,root) %{_libdir}/caja/extensions-2.0/libatril-properties-page.so | |
349 | %endif |