1 |
%define name gvfs |
2 |
%define version 1.7.2 |
3 |
%define release %mkrel 1 |
4 |
|
5 |
%define major 0 |
6 |
%define libname %mklibname %name %major |
7 |
%define develname %mklibname -d %name |
8 |
|
9 |
%define enable_gphoto2 1 |
10 |
%define enable_iphone 0 |
11 |
|
12 |
%define giolibname %mklibname gio2.0_ 0 |
13 |
|
14 |
Summary: Glib VFS library |
15 |
Name: %{name} |
16 |
Version: %{version} |
17 |
Release: %{release} |
18 |
Source0: ftp://ftp.gnome.org/pub/GNOME/sources/gvfs/1.7/%{name}-%{version}.tar.bz2 |
19 |
Source1: bash-completion |
20 |
#gw from Ubuntu, fix music player detection |
21 |
# https://bugs.freedesktop.org/show_bug.cgi?id=24500 |
22 |
Patch0: gvfs-music-player-mimetype.patch |
23 |
License: LGPLv2+ |
24 |
Group: System/Libraries |
25 |
Url: http://www.gnome.org/ |
26 |
BuildRequires: libgudev-devel |
27 |
BuildRequires: libcdio-devel |
28 |
BuildRequires: fuse-devel |
29 |
BuildRequires: libsmbclient-devel |
30 |
BuildRequires: libsoup-devel >= 2.23.91 |
31 |
BuildRequires: glib2-devel >= 2.23.4 |
32 |
BuildRequires: libarchive-devel |
33 |
BuildRequires: libGConf2-devel |
34 |
BuildRequires: intltool |
35 |
%if %{enable_gphoto2} |
36 |
BuildRequires: gphoto2-devel |
37 |
%endif |
38 |
%if %{enable_iphone} |
39 |
BuildRequires: libimobiledevice-devel >= 1.1.0 |
40 |
%endif |
41 |
BuildRequires: libgnome-keyring-devel |
42 |
BuildRequires: avahi-glib-devel |
43 |
BuildRequires: avahi-client-devel |
44 |
BuildRequires: bluez-devel |
45 |
BuildRequires: dbus-glib-devel |
46 |
BuildRequires: expat-devel |
47 |
BuildRequires: gtk-doc |
48 |
BuildRequires: libgdu-devel >= 2.29.0 |
49 |
BuildRequires: sqlite3-devel |
50 |
BuildRequires: libproxy-devel |
51 |
#gw the dbus service depends on the daemon in the library package |
52 |
Requires: %libname = %version |
53 |
Suggests: %name-fuse |
54 |
Suggests: %name-smb |
55 |
Suggests: %name-archive |
56 |
#Suggests: %name-obexftp |
57 |
%if %{enable_gphoto2} |
58 |
Suggests: %name-gphoto2 |
59 |
%endif |
60 |
|
61 |
%description |
62 |
This is a Virtual File System library based on gio and Glib. |
63 |
|
64 |
%package -n %{libname} |
65 |
Group: System/Libraries |
66 |
Summary: Glib VFS library |
67 |
Requires: %name >= %version |
68 |
Requires(post): %giolibname |
69 |
Requires(postun): %giolibname |
70 |
|
71 |
%description -n %{libname} |
72 |
This is a Virtual File System library based on gio and Glib. |
73 |
|
74 |
%package -n %develname |
75 |
Group: Development/C |
76 |
Summary: Glib VFS Library - development files |
77 |
Requires: %libname = %version |
78 |
Provides: libgvfs-devel = %version-%release |
79 |
|
80 |
%description -n %develname |
81 |
This is a Virtual File System library based on gio and Glib. |
82 |
|
83 |
%package fuse |
84 |
Summary: FUSE support for gvfs |
85 |
Group: System/Libraries |
86 |
Requires: %{name} = %{version}-%{release} |
87 |
Requires: fuse |
88 |
|
89 |
%description fuse |
90 |
This package provides support for applications not using gio |
91 |
to access the gvfs filesystems. |
92 |
|
93 |
|
94 |
%package smb |
95 |
Summary: Windows fileshare support for gvfs |
96 |
Group: System/Libraries |
97 |
Requires: %{name} = %{version}-%{release} |
98 |
|
99 |
%description smb |
100 |
This package provides support for reading and writing files on windows |
101 |
shares (SMB) to applications using gvfs. |
102 |
|
103 |
%package archive |
104 |
Summary: Archiving support for gvfs |
105 |
Group: System/Libraries |
106 |
Requires: %{name} = %{version}-%{release} |
107 |
|
108 |
%description archive |
109 |
This package provides support for accessing files inside Zip and Tar archives, |
110 |
as well as ISO images, to applications using gvfs. |
111 |
|
112 |
|
113 |
%package obexftp |
114 |
Summary: ObexFTP support for gvfs |
115 |
Group: System/Libraries |
116 |
Requires: %{name} = %{version}-%{release} |
117 |
Requires: obex-data-server >= 0.3.4-6 |
118 |
|
119 |
%description obexftp |
120 |
This package provides support for reading files on Bluetooth mobile phones |
121 |
and devices through ObexFTP to applications using gvfs. |
122 |
|
123 |
%package gphoto2 |
124 |
Summary: gphoto2 support for gvfs |
125 |
Group: System/Libraries |
126 |
Requires: %{name} = %{version}-%{release} |
127 |
|
128 |
%description gphoto2 |
129 |
This package provides support for reading and writing files on |
130 |
PTP based cameras (Picture Transfer Protocol) and MTP based |
131 |
media players (Media Transfer Protocol) to applications using gvfs. |
132 |
|
133 |
%package iphone |
134 |
Summary: iphone support for gvfs |
135 |
Group: System/Libraries |
136 |
Requires: %{name} = %{version}-%{release} |
137 |
|
138 |
%description iphone |
139 |
This package provides support for reading and writing files on |
140 |
the iPhone and the iPod TouchP to applications using gvfs. |
141 |
|
142 |
|
143 |
%prep |
144 |
%setup -q |
145 |
%apply_patches |
146 |
|
147 |
%build |
148 |
%configure2_5x --with-dbus-service-dir=%{_datadir}/dbus-1/services \ |
149 |
--enable-gdu \ |
150 |
%if %{enable_gphoto2} |
151 |
--enable-gphoto2 |
152 |
%else |
153 |
--disable-gphoto2 |
154 |
%endif |
155 |
|
156 |
%make |
157 |
|
158 |
%install |
159 |
rm -rf %{buildroot} |
160 |
%makeinstall_std |
161 |
|
162 |
rm -f %buildroot%{_libdir}/gio/modules/*.la |
163 |
|
164 |
%find_lang gvfs |
165 |
|
166 |
# upstream bash completion is installed in the wrong place, with the wrong perms |
167 |
# and redefine system variables without notice |
168 |
rm -f %buildroot%_sysconfdir/profile.d/gvfs-bash-completion.sh |
169 |
install -d -m 755 %buildroot%_sysconfdir/bash_completion.d |
170 |
install -m 644 %{SOURCE1} %buildroot%_sysconfdir/bash_completion.d/%{name} |
171 |
|
172 |
%clean |
173 |
rm -rf %{buildroot} |
174 |
|
175 |
%post -n %libname |
176 |
%if %_lib != lib |
177 |
%{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules |
178 |
%else |
179 |
%{_bindir}/gio-querymodules-32 %{_libdir}/gio/modules |
180 |
%endif |
181 |
|
182 |
%postun -n %libname |
183 |
if [ "$1" = "0" ]; then |
184 |
%if %_lib != lib |
185 |
%{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules |
186 |
%else |
187 |
%{_bindir}/gio-querymodules-32 %{_libdir}/gio/modules |
188 |
%endif |
189 |
fi |
190 |
|
191 |
glib-compile-schemas %{_datadir}/glib-2.0/schemas || : |
192 |
|
193 |
%posttrans |
194 |
glib-compile-schemas %{_datadir}/glib-2.0/schemas || : |
195 |
|
196 |
%files -f gvfs.lang |
197 |
%defattr(-,root,root) |
198 |
%_sysconfdir/bash_completion.d/gvfs |
199 |
%{_bindir}/gvfs-* |
200 |
%{_datadir}/dbus-1/services/gvfs-daemon.service |
201 |
%{_datadir}/dbus-1/services/gvfs-metadata.service |
202 |
%{_datadir}/dbus-1/services/org.gtk.Private.GduVolumeMonitor.service |
203 |
%dir %{_datadir}/gvfs |
204 |
%dir %{_datadir}/gvfs/mounts |
205 |
%dir %{_datadir}/gvfs/remote-volume-monitors |
206 |
%{_datadir}/gvfs/remote-volume-monitors/gdu.monitor |
207 |
%{_datadir}/gvfs/mounts/sftp.mount |
208 |
%{_datadir}/gvfs/mounts/trash.mount |
209 |
%{_datadir}/gvfs/mounts/cdda.mount |
210 |
%{_datadir}/gvfs/mounts/computer.mount |
211 |
%{_datadir}/gvfs/mounts/dav.mount |
212 |
%{_datadir}/gvfs/mounts/dav+sd.mount |
213 |
%{_datadir}/gvfs/mounts/http.mount |
214 |
%{_datadir}/gvfs/mounts/localtest.mount |
215 |
%{_datadir}/gvfs/mounts/burn.mount |
216 |
%{_datadir}/gvfs/mounts/dns-sd.mount |
217 |
%{_datadir}/gvfs/mounts/network.mount |
218 |
%{_datadir}/gvfs/mounts/ftp.mount |
219 |
%{_datadir}/GConf/gsettings/*.convert |
220 |
%{_datadir}/glib-2.0/schemas/*.xml |
221 |
|
222 |
%files -n %libname |
223 |
%defattr(-,root,root) |
224 |
%{_libdir}/gio/modules/libgioremote-volume-monitor.so |
225 |
%{_libdir}/gio/modules/libgvfsdbus.so |
226 |
%{_libexecdir}/gvfs-gdu-volume-monitor |
227 |
|
228 |
%{_libexecdir}/gvfsd |
229 |
%{_libexecdir}/gvfsd-ftp |
230 |
%{_libexecdir}/gvfsd-metadata |
231 |
%{_libexecdir}/gvfsd-sftp |
232 |
%{_libexecdir}/gvfsd-trash |
233 |
%{_libexecdir}/gvfsd-cdda |
234 |
%{_libexecdir}/gvfsd-computer |
235 |
%{_libexecdir}/gvfsd-dav |
236 |
%{_libexecdir}/gvfsd-http |
237 |
%{_libexecdir}/gvfsd-localtest |
238 |
%{_libexecdir}/gvfsd-burn |
239 |
%{_libexecdir}/gvfsd-dnssd |
240 |
%{_libexecdir}/gvfsd-network |
241 |
%{_libdir}/libgvfscommon.so.%{major}* |
242 |
%{_libdir}/libgvfscommon-dnssd.so.%{major}* |
243 |
|
244 |
%files -n %develname |
245 |
%defattr(-,root,root) |
246 |
%doc NEWS ChangeLog AUTHORS TODO |
247 |
%{_libdir}/lib*.so |
248 |
%{_libdir}/lib*.la |
249 |
%_includedir/gvfs-client |
250 |
|
251 |
%files fuse |
252 |
%defattr(-, root, root, -) |
253 |
%{_libexecdir}/gvfs-fuse-daemon |
254 |
|
255 |
|
256 |
%files smb |
257 |
%defattr(-, root, root, -) |
258 |
%{_libexecdir}/gvfsd-smb |
259 |
%{_libexecdir}/gvfsd-smb-browse |
260 |
%{_datadir}/gvfs/mounts/smb-browse.mount |
261 |
%{_datadir}/gvfs/mounts/smb.mount |
262 |
|
263 |
%files archive |
264 |
%defattr(-, root, root, -) |
265 |
%{_libexecdir}/gvfsd-archive |
266 |
%{_datadir}/gvfs/mounts/archive.mount |
267 |
|
268 |
|
269 |
%files obexftp |
270 |
%defattr(-, root, root, -) |
271 |
%{_libexecdir}/gvfsd-obexftp |
272 |
%{_datadir}/gvfs/mounts/obexftp.mount |
273 |
|
274 |
%if %{enable_gphoto2} |
275 |
%files gphoto2 |
276 |
%defattr(-, root, root, -) |
277 |
%{_libexecdir}/gvfsd-gphoto2 |
278 |
%{_datadir}/gvfs/mounts/gphoto2.mount |
279 |
%{_libexecdir}/gvfs-gphoto2-volume-monitor |
280 |
%{_datadir}/dbus-1/services/org.gtk.Private.GPhoto2VolumeMonitor.service |
281 |
%{_datadir}/gvfs/remote-volume-monitors/gphoto2.monitor |
282 |
%endif |
283 |
|
284 |
%if %{enable_iphone} |
285 |
%files iphone |
286 |
%defattr(-, root, root, -) |
287 |
%{_libexecdir}/gvfs-afc-volume-monitor |
288 |
%{_libexecdir}/gvfsd-afc |
289 |
%{_datadir}/dbus-1/services/org.gtk.Private.AfcVolumeMonitor.service |
290 |
%{_datadir}/gvfs/mounts/afc.mount |
291 |
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor |
292 |
%endif |