1 |
%define name gvfs |
2 |
%define version 1.7.2 |
3 |
%define release %mkrel 2 |
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 |
%files -f gvfs.lang |
192 |
%defattr(-,root,root) |
193 |
%_sysconfdir/bash_completion.d/gvfs |
194 |
%{_bindir}/gvfs-* |
195 |
%{_datadir}/dbus-1/services/gvfs-daemon.service |
196 |
%{_datadir}/dbus-1/services/gvfs-metadata.service |
197 |
%{_datadir}/dbus-1/services/org.gtk.Private.GduVolumeMonitor.service |
198 |
%dir %{_datadir}/gvfs |
199 |
%dir %{_datadir}/gvfs/mounts |
200 |
%dir %{_datadir}/gvfs/remote-volume-monitors |
201 |
%{_datadir}/gvfs/remote-volume-monitors/gdu.monitor |
202 |
%{_datadir}/gvfs/mounts/sftp.mount |
203 |
%{_datadir}/gvfs/mounts/trash.mount |
204 |
%{_datadir}/gvfs/mounts/cdda.mount |
205 |
%{_datadir}/gvfs/mounts/computer.mount |
206 |
%{_datadir}/gvfs/mounts/dav.mount |
207 |
%{_datadir}/gvfs/mounts/dav+sd.mount |
208 |
%{_datadir}/gvfs/mounts/http.mount |
209 |
%{_datadir}/gvfs/mounts/localtest.mount |
210 |
%{_datadir}/gvfs/mounts/burn.mount |
211 |
%{_datadir}/gvfs/mounts/dns-sd.mount |
212 |
%{_datadir}/gvfs/mounts/network.mount |
213 |
%{_datadir}/gvfs/mounts/ftp.mount |
214 |
%{_datadir}/GConf/gsettings/*.convert |
215 |
%{_datadir}/glib-2.0/schemas/*.xml |
216 |
|
217 |
%files -n %libname |
218 |
%defattr(-,root,root) |
219 |
%{_libdir}/gio/modules/libgioremote-volume-monitor.so |
220 |
%{_libdir}/gio/modules/libgvfsdbus.so |
221 |
%{_libexecdir}/gvfs-gdu-volume-monitor |
222 |
|
223 |
%{_libexecdir}/gvfsd |
224 |
%{_libexecdir}/gvfsd-ftp |
225 |
%{_libexecdir}/gvfsd-metadata |
226 |
%{_libexecdir}/gvfsd-sftp |
227 |
%{_libexecdir}/gvfsd-trash |
228 |
%{_libexecdir}/gvfsd-cdda |
229 |
%{_libexecdir}/gvfsd-computer |
230 |
%{_libexecdir}/gvfsd-dav |
231 |
%{_libexecdir}/gvfsd-http |
232 |
%{_libexecdir}/gvfsd-localtest |
233 |
%{_libexecdir}/gvfsd-burn |
234 |
%{_libexecdir}/gvfsd-dnssd |
235 |
%{_libexecdir}/gvfsd-network |
236 |
%{_libdir}/libgvfscommon.so.%{major}* |
237 |
%{_libdir}/libgvfscommon-dnssd.so.%{major}* |
238 |
|
239 |
%files -n %develname |
240 |
%defattr(-,root,root) |
241 |
%doc NEWS ChangeLog AUTHORS TODO |
242 |
%{_libdir}/lib*.so |
243 |
%{_libdir}/lib*.la |
244 |
%_includedir/gvfs-client |
245 |
|
246 |
%files fuse |
247 |
%defattr(-, root, root, -) |
248 |
%{_libexecdir}/gvfs-fuse-daemon |
249 |
|
250 |
|
251 |
%files smb |
252 |
%defattr(-, root, root, -) |
253 |
%{_libexecdir}/gvfsd-smb |
254 |
%{_libexecdir}/gvfsd-smb-browse |
255 |
%{_datadir}/gvfs/mounts/smb-browse.mount |
256 |
%{_datadir}/gvfs/mounts/smb.mount |
257 |
|
258 |
%files archive |
259 |
%defattr(-, root, root, -) |
260 |
%{_libexecdir}/gvfsd-archive |
261 |
%{_datadir}/gvfs/mounts/archive.mount |
262 |
|
263 |
|
264 |
%files obexftp |
265 |
%defattr(-, root, root, -) |
266 |
%{_libexecdir}/gvfsd-obexftp |
267 |
%{_datadir}/gvfs/mounts/obexftp.mount |
268 |
|
269 |
%if %{enable_gphoto2} |
270 |
%files gphoto2 |
271 |
%defattr(-, root, root, -) |
272 |
%{_libexecdir}/gvfsd-gphoto2 |
273 |
%{_datadir}/gvfs/mounts/gphoto2.mount |
274 |
%{_libexecdir}/gvfs-gphoto2-volume-monitor |
275 |
%{_datadir}/dbus-1/services/org.gtk.Private.GPhoto2VolumeMonitor.service |
276 |
%{_datadir}/gvfs/remote-volume-monitors/gphoto2.monitor |
277 |
%endif |
278 |
|
279 |
%if %{enable_iphone} |
280 |
%files iphone |
281 |
%defattr(-, root, root, -) |
282 |
%{_libexecdir}/gvfs-afc-volume-monitor |
283 |
%{_libexecdir}/gvfsd-afc |
284 |
%{_datadir}/dbus-1/services/org.gtk.Private.AfcVolumeMonitor.service |
285 |
%{_datadir}/gvfs/mounts/afc.mount |
286 |
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor |
287 |
%endif |