Summary: Backends for the gio framework in GLib
Summary(ja): GLib の GIO フレームワークのバックエンド
Name: gvfs
Version: 1.6.1
Release: 1%{?_dist_release}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
Source: http://download.gnome.org/sources/gvfs/1.2/gvfs-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pkgconfig
BuildRequires: glib2-devel >= 2.24.0
BuildRequires: dbus-glib-devel 
BuildRequires: /usr/bin/ssh
BuildRequires: libcdio-devel >= 0.78.2
BuildRequires: libsoup-devel >= 2.30.0
BuildRequires: avahi-glib-devel >= 0.6
BuildRequires: libgnome-keyring-devel
BuildRequires: intltool
BuildRequires: gettext
BuildRequires: perl-XML-Parser
BuildRequires: GConf2-devel
BuildRequires: libgudev1-devel

Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils

# The patch touches Makefile.am files:
BuildRequires: automake autoconf
BuildRequires: libtool
Patch1: gvfs-0.99.2-archive-integration.patch

%description
The gvfs package provides backend implementations for the gio 
framework in GLib. It includes ftp, sftp, cifs. 

%package devel
Summary: Development files for gvfs
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
The gvfs-devel package contains headers and other files that are
required to develop applications using gvfs.

%package fuse
Summary: FUSE support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: fuse-devel
Requires: fuse

%description fuse
This package provides support for applications not using gio
to access the gvfs filesystems.


%package smb
Summary: Windows fileshare support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: libsmbclient-devel

%description smb
This package provides support for reading and writing files on windows
shares (SMB) to applications using gvfs.


%package archive
Summary: Archiving support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: libarchive-devel

%description archive
This package provides support for accessing files inside Zip and Tar archives,
as well as ISO images, to applications using gvfs.


%package obexftp
Summary: ObexFTP support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: bluez-libs-devel >= 4.15
BuildRequires: expat-devel

%description obexftp
This package provides support for reading files on Bluetooth mobile phones
and devices through ObexFTP to applications using gvfs.


%package gphoto2
Summary: gphoto2 support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: libgphoto2-devel
BuildRequires: libusb-devel
BuildRequires: libexif-devel

%description gphoto2
This package provides support for reading and writing files on
PTP based cameras (Picture Transfer Protocol) and MTP based
media players (Media Transfer Protocol) to applications using gvfs.


%prep
%setup -q
%patch1 -p0 -b .archive-integration

%build

# Needed for gvfs-0.2.1-archive-integration.patch
libtoolize --force  || :
aclocal  || :
autoheader  || :
automake  || :
autoconf  || :

%configure --disable-hal
make # %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm $RPM_BUILD_ROOT%{_libdir}/gio/modules/*.la

%find_lang gvfs

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
# Reload .mount files:
killall -USR1 gvfsd >&/dev/null || :
# Update desktop files mime mappings:
update-desktop-database &> /dev/null ||:

%postun
/sbin/ldconfig
# Update desktop files mime mappings:
update-desktop-database &> /dev/null ||:

%files -f gvfs.lang
%defattr(-, root, root, -)
%doc AUTHORS COPYING NEWS README
%dir %{_datadir}/gvfs
%dir %{_datadir}/gvfs/mounts
%{_sysconfdir}/profile.d/gvfs-bash-completion.sh
%{_datadir}/gvfs/mounts/sftp.mount
%{_datadir}/gvfs/mounts/trash.mount
%{_datadir}/gvfs/mounts/cdda.mount
%{_datadir}/gvfs/mounts/computer.mount
%{_datadir}/gvfs/mounts/dav.mount
%{_datadir}/gvfs/mounts/dav+sd.mount
%{_datadir}/gvfs/mounts/http.mount
%{_datadir}/gvfs/mounts/localtest.mount
%{_datadir}/gvfs/mounts/burn.mount
%{_datadir}/gvfs/mounts/dns-sd.mount
%{_datadir}/gvfs/mounts/network.mount
%{_datadir}/gvfs/mounts/ftp.mount
%{_datadir}/dbus-1/services/gvfs-daemon.service
%{_datadir}/dbus-1/services/gvfs-metadata.service
## %{_datadir}/dbus-1/services/org.gtk.Private.HalVolumeMonitor.service
## %{_datadir}/gvfs/remote-volume-monitors/hal.monitor
%{_libdir}/libgvfscommon.so.*
%{_libdir}/libgvfscommon-dnssd.so.*
# %{_libdir}/gio/modules/libgiohal-volume-monitor.so
%{_libdir}/gio/modules/libgioremote-volume-monitor.so
%{_libdir}/gio/modules/libgvfsdbus.so
%{_libdir}/gio/modules/libgiogconf.so
%{_libexecdir}/gvfsd
%{_libexecdir}/gvfsd-ftp
%{_libexecdir}/gvfsd-sftp
%{_libexecdir}/gvfsd-trash
%{_libexecdir}/gvfsd-cdda
%{_libexecdir}/gvfsd-computer
%{_libexecdir}/gvfsd-dav
%{_libexecdir}/gvfsd-http
%{_libexecdir}/gvfsd-localtest
%{_libexecdir}/gvfsd-burn
%{_libexecdir}/gvfsd-dnssd
%{_libexecdir}/gvfsd-network
%{_libexecdir}/gvfsd-metadata
## %{_libexecdir}/gvfs-hal-volume-monitor
%{_bindir}/gvfs-cat
%{_bindir}/gvfs-copy
%{_bindir}/gvfs-info
%{_bindir}/gvfs-less
%{_bindir}/gvfs-ls
%{_bindir}/gvfs-mkdir
%{_bindir}/gvfs-monitor-dir
%{_bindir}/gvfs-monitor-file
%{_bindir}/gvfs-mount
%{_bindir}/gvfs-move
%{_bindir}/gvfs-open
%{_bindir}/gvfs-rename
%{_bindir}/gvfs-rm
%{_bindir}/gvfs-save
%{_bindir}/gvfs-set-attribute
%{_bindir}/gvfs-trash
%{_bindir}/gvfs-tree

%files devel
%defattr(-, root, root, -)
%dir %{_includedir}/gvfs-client
%dir %{_includedir}/gvfs-client/gvfs
%{_includedir}/gvfs-client/gvfs/gvfsurimapper.h
%{_includedir}/gvfs-client/gvfs/gvfsuriutils.h
%{_libdir}/libgvfscommon.so
%{_libdir}/libgvfscommon-dnssd.so


%files fuse
%defattr(-, root, root, -)
%{_libexecdir}/gvfs-fuse-daemon


%files smb
%defattr(-, root, root, -)
%{_libexecdir}/gvfsd-smb
%{_libexecdir}/gvfsd-smb-browse
%{_datadir}/gvfs/mounts/smb-browse.mount
%{_datadir}/gvfs/mounts/smb.mount


%files archive
%defattr(-, root, root, -)
%dir %{_datadir}/applications/mount-archive.desktop
%{_libexecdir}/gvfsd-archive
%{_datadir}/gvfs/mounts/archive.mount


%files obexftp
%defattr(-, root, root, -)
%{_libexecdir}/gvfsd-obexftp
%{_datadir}/gvfs/mounts/obexftp.mount


%files gphoto2
%defattr(-, root, root, -)
%{_libexecdir}/gvfsd-gphoto2
%{_datadir}/gvfs/mounts/gphoto2.mount
%{_libexecdir}/gvfs-gphoto2-volume-monitor
%{_datadir}/dbus-1/services/org.gtk.Private.GPhoto2VolumeMonitor.service
%{_datadir}/gvfs/remote-volume-monitors/gphoto2.monitor


%changelog
* Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release

* Sun Apr 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-1
- new upstream release
- change BuildRequires: gnome-keyring-devel -> libgnome-keyring-devel
- change BuildRequires: hal-devel -> ibgudev1-devel
- add configure option (--disable-hal)

* Sun Mar 14 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.3-1
- new upstream release

* Sat Oct 31 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.1-1
- new upstream release

* Thu May 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.3-2
- new upstream release

* Sat Apr 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.2-1
- new upstream release

* Sat Apr 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.0-2
- new upstream release

* Thu Oct 23 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.2-1
- new upstream release
- BR: bluez-libs-devel >= 4.15

* Thu Oct 23 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.0.1-2
- rebuild with bluez-libs-devel-4.15

* Fri Sep 26 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.1-1
- new upstream release

* Mon Sep 22 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.0-1
- new upstream release

* Sat Sep 06 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.99.6-1
- new upstream release
- split out backends to sub packages

* Thu Jul 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.99.1-1
- new upstream release

* Thu Apr 10 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.2.3-1vl5
- new upstream release

* Wed Apr  2 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.2.2-1vl5
- Initial build for Vine Linux

* Fri Mar 28 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.2.2-1
- Update to 0.2.2

* Tue Mar 25 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.2.1-4
- Moved fuse stuff to a dedicated package

* Thu Mar 20 2008 Alexander Larsson <alexl@redhat.com> - 0.2.1-3
- Add patch with simple archive backend UI integration

* Tue Mar 19 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.2.1-2
- Added libarchive dependency for archive backend
- Require new libsmbclient in order to get smb backend working again

* Tue Mar 18 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.2.1-1
- Update to 0.2.1 (archive backend temporarily disabled)

* Mon Mar 17 2008 Matthias Clasen  <mclasen@redhat.com> - 0.2.0.1-2
- Silence %%post

* Mon Mar 10 2008 Matthias Clasen  <mclasen@redhat.com> - 0.2.0.1-1
- Update to 0.2.0.1

* Thu Mar  6 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.1.11-2
- Add patch that fixes a deadlock when foreign volume is removed

* Tue Mar  4 2008 Matthias Clasen  <mclasen@redhat.com> - 0.1.11-1
- Update to 0.1.11

* Tue Mar 04 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.1.10-1
- Update to 0.1.10

* Mon Feb 25 2008 Alexander Larsson <alexl@redhat.com> - 0.1.8-1
- Update to 0.1.8

* Thu Feb 14 2008 Alexander Larsson <alexl@redhat.com> - 0.1.7-3
- Add patch that fixes a smb bug that can cause short reads when copying files

* Tue Feb 12 2008 Alexander Larsson <alexl@redhat.com> - 0.1.7-2
- Fix double free in hal volume monitor
- Ensure gconf module is built by adding build dep

* Mon Feb 11 2008 Matthias Clasen <mclasen@redhat.com> - 0.1.7-1
- Update to 0.1.7

* Tue Jan 29 2008 Matthias Clasen <mclasen@redhat.com> - 0.1.6-1
- Update to 0.1.6

* Mon Jan 28 2008 Matthias Clasen <mclasen@redhat.com> - 0.1.5-1
- Update to 0.1.5
- Reenable http/dav 

* Mon Jan 21 2008 Alexander Larsson <alexl@redhat.com> - 0.1.4-2 
- Remove the http/dav stuff for now, as we don't have the latest libsoup

* Mon Jan 21 2008 Alexander Larsson <alexl@redhat.com> - 0.1.4-1
- Update to 0.1.4
- Send USR1 in post to reload config

* Mon Jan 14 2008 Matthias Clasen <mclasen@redhat.com> 0.1.2-1
- Update to 0.1.2

* Tue Jan  8 2008 Matthias Clasen <mclasen@redhat.com> 0.1.1-1
- Update to 0.1.1

* Thu Dec 20 2007 Matthias Clasen <mclasen@redhat.com> 0.1.0-1
- Initial packaging
