#
# spec file for package gvfs (Version 1.5.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           gvfs
Version:        1.5.1
Release:        1
# FIXME add libiphone-devel BuildRequires (it's available in the build service, talking to the packager to add it to factory)
License:        LGPLv2.0+
Summary:        VFS functionality for GLib
Url:            http://www.gnome.org
Group:          Development/Libraries/C and C++
Source0:        %{name}-%{version}.tar.bz2
# PATCH-FEATURE-OPENSUSE gvfs-dice-backend.patch hpj@suse.de -- Implements Novell IceDesktop backend. Should be upstreamed eventually.
Patch1:         gvfs-dice-backend.patch
# PATCH-FIX-UPSTREAM gvfs-429959-handle-blank-schemas.patch bnc429959 hpj@suse.de -- Fix URI handler lookup with blank schemas.
Patch4:         gvfs-429959-handle-blank-schemas.patch
# PATCH-FEATURE-OPENSUSE gvfs-nvvfs.patch ksamrat@novell.com -- Provides gvfs backend for novell nautilus plugin
Patch5:         gvfs-nvvfs.patch
# PATCH-FEATURE-OPENSUSE gvfs-nds.patch ksamrat@novell.com -- Provides NDS browsing for nautilus
Patch6:         gvfs-nds.patch
BuildRequires:  bluez-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  fuse-devel
BuildRequires:  gconf2-devel
BuildRequires:  glib2-devel
BuildRequires:  hal-devel
BuildRequires:  intltool
BuildRequires:  libarchive-devel
BuildRequires:  libavahi-glib-devel
BuildRequires:  libcdio-devel
BuildRequires:  libexpat-devel
BuildRequires:  libgnome-keyring-devel
BuildRequires:  libgphoto2-devel
BuildRequires:  libsmbclient-devel
BuildRequires:  libsoup-devel
BuildRequires:  pkg-config
BuildRequires:  translation-update-upstream
%if %suse_version > 1110
BuildRequires:  libgdu-devel
BuildRequires:  libgudev-1_0-devel
%endif
Requires:       %{name}-lang = %{version}
Requires:       libgvfscommon0 = %{version}
Recommends:     gvfs-backends
Recommends:     gvfs-common
Recommends:     gvfs-fuse
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
VFS functionality for GLib.

%package -n libgvfscommon0
License:        LGPLv2.0+
Summary:        VFS functionality for GLib
Group:          Development/Libraries/C and C++
Requires:       %{name} >= %{version}

%description -n libgvfscommon0
VFS functionality for GLib.

%package backends
License:        LGPLv2.0+
Summary:        VFS functionality for GLib
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
# FIXME: Requires: or Recommends:? -> Recommends
Recommends:     obex-data-server

%description backends
VFS functionality for GLib.

%package fuse
License:        LGPLv2.0+
Summary:        VFS functionality for GLib
Group:          System/Filesystems
Requires:       %{name} = %{version}
Requires:       fuse

%description fuse
VFS functionality for GLib.

%package devel
License:        LGPLv2.0+
Summary:        VFS functionality for GLib
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
VFS functionality for GLib.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch1 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

%build
autoreconf -f
libtoolize -c -f
%configure \
    --libexecdir=%{_libdir}/%{name} \
    --disable-static
%__make

%install
%makeinstall
rm %{buildroot}%{_libdir}/*.*a
rm %{buildroot}%{_libdir}/gio/modules/*.*a
# We can drop the chmod when bgo523420 is fixed.
chmod -x %{buildroot}%{_sysconfdir}/profile.d/*
%find_lang %{name}

%post -n libgvfscommon0 -p /sbin/ldconfig

%postun -n libgvfscommon0 -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc AUTHORS NEWS README TODO
%{_bindir}/*
%{_datadir}/dbus-1/services/*.service
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/mounts
%dir %{_datadir}/%{name}/remote-volume-monitors
%{_libdir}/gio/modules/*.so
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/gvfsd
%{_sysconfdir}/profile.d/*

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

%files backends
%defattr(-, root, root)
%if %suse_version > 1110
%{_libdir}/%{name}/gvfs-gdu-volume-monitor
%{_datadir}/%{name}/remote-volume-monitors/gdu.monitor
%endif
%{_libdir}/%{name}/gvfs-gphoto2-volume-monitor
%{_datadir}/%{name}/remote-volume-monitors/gphoto2.monitor
%{_libdir}/%{name}/gvfs-hal-volume-monitor
%{_datadir}/%{name}/remote-volume-monitors/hal.monitor
%{_libdir}/%{name}/gvfsd-archive
%{_datadir}/%{name}/mounts/archive.mount
%{_libdir}/%{name}/gvfsd-burn
%{_datadir}/%{name}/mounts/burn.mount
%{_libdir}/%{name}/gvfsd-cdda
%{_datadir}/%{name}/mounts/cdda.mount
%{_libdir}/%{name}/gvfsd-computer
%{_datadir}/%{name}/mounts/computer.mount
%{_libdir}/%{name}/gvfsd-dav
%{_datadir}/%{name}/mounts/dav.mount
%{_datadir}/%{name}/mounts/dav+sd.mount
%{_libdir}/%{name}/gvfsd-dice
%{_datadir}/%{name}/mounts/dice.mount
%{_libdir}/%{name}/gvfsd-dnssd
%{_datadir}/%{name}/mounts/dns-sd.mount
%{_libdir}/%{name}/gvfsd-ftp
%{_datadir}/%{name}/mounts/ftp.mount
%{_libdir}/%{name}/gvfsd-gphoto2
%{_datadir}/%{name}/mounts/gphoto2.mount
%{_libdir}/%{name}/gvfsd-http
%{_datadir}/%{name}/mounts/http.mount
%{_libdir}/%{name}/gvfsd-localtest
%{_datadir}/%{name}/mounts/localtest.mount
%{_libdir}/%{name}/gvfsd-metadata
%{_libdir}/%{name}/gvfsd-nds
%{_datadir}/%{name}/mounts/nds.mount
%{_libdir}/%{name}/gvfsd-network
%{_datadir}/%{name}/mounts/network.mount
%{_libdir}/%{name}/gvfsd-nvvfs
%{_datadir}/%{name}/mounts/nvvfs.mount
%{_libdir}/%{name}/gvfsd-obexftp
%{_datadir}/%{name}/mounts/obexftp.mount
%{_libdir}/%{name}/gvfsd-sftp
%{_datadir}/%{name}/mounts/sftp.mount
%{_libdir}/%{name}/gvfsd-smb
%{_datadir}/%{name}/mounts/smb.mount
%{_libdir}/%{name}/gvfsd-smb-browse
%{_datadir}/%{name}/mounts/smb-browse.mount
%{_libdir}/%{name}/gvfsd-trash
%{_datadir}/%{name}/mounts/trash.mount

%files -n libgvfscommon0
%defattr(-, root, root)
%{_libdir}/*.so.*

%files devel
%defattr(-, root, root)
%{_includedir}/gvfs-client
%{_libdir}/*.so

%files lang -f %{name}.lang

%changelog