Пакет gnome-mount: Specfile

%def_enable nautilus_extension

Name:    gnome-mount
Version: 0.8
Release: alt3

Summary: Mount replacement which uses HAL to do the mounting 
License: GPLv2+
Group: Graphical desktop/GNOME
Url: http://hal.freedesktop.org/
Source: http://hal.freedesktop.org/releases/%name-%version.tar.gz

Patch1: gnome-mount-0.8-alt-mount-options.patch
Patch2: gnome-mount-0.8-alt-fix-link.patch
Patch3: gnome-mount-0.8-alt-link-gnomeui.patch

#http://bugzilla.gnome.org/show_bug.cgi?id=511503
Patch10: gnome-mount-ubuntu-missing_include.patch

Patch11: gnome-mount-ubuntu-ignore_slash_label.patch
#http://bugzilla.gnome.org/show_bug.cgi?id=426326
Patch12: gnome-mount-ubuntu-crypto_setup_error_dialog.patch
#http://bugzilla.gnome.org/show_bug.cgi?id=511507
Patch13: gnome-mount-libnotify-configure.patch

# need time for testing
#http://bugzilla.gnome.org/show_bug.cgi?id=528551
Patch14: gnome-mount-locale.diff
#http://bugzilla.gnome.org/show_bug.cgi?id=528559
Patch15: gnome-mount-add_details_blocking.patch

# (fc) 0.6-3mdv allow to unmount device with no media detected (Mdv bug #30157) 
Patch25: gnome-mount-unmount_nomedia.patch
# (fc) 0.8-0.20080225.2mdv fix parsing mount message on non-english locale and ensure they are output correctly when using non-UTF8 locale 
Patch27: gnome-mount-0.8-utf8_message.patch
# (fc) 0.8-3mdv respect lock when device is in fstab (GNOME bug #551841) 
Patch28: gnome-mount-0.8-fstablock.patch

# From configure.in
%define intltool_ver 0.35.0
%define glib_ver 2.15.0
%define nautilus_ver 2.21.2
%define keyring_ver 0.4
%define hal_ver 0.5.8.1
%define dbus_ver 0.60
%define dbus_glib_ver 0.60
%define libnotify_ver 0.3.0

PreReq: GConf

BuildPreReq: rpm-build-gnome
# From configure.in
BuildPreReq: intltool >= %intltool_ver
BuildPreReq: libGConf-devel
BuildPreReq: libgnome-keyring-devel >= %keyring_ver
BuildPreReq: libdbus-glib-devel >= 0.31
BuildPreReq: libhal-devel >= %hal_ver
BuildPreReq: libgtk+2-devel >= 2.8.0
BuildPreReq: glib2-devel
BuildPreReq: libnotify-devel >= %libnotify_ver

%if_enabled nautilus_extension
BuildPreReq: libglade-devel
BuildPreReq: libdbus-devel >= %dbus_ver
BuildPreReq: libdbus-glib-devel >= %dbus_glib_ver
BuildPreReq: glib2-devel >= %glib_ver
BuildPreReq: libnautilus-devel >= %nautilus_ver
%endif

BuildRequires: GConf gcc-c++ perl-XML-Parser

%description
A replacement for the mount, umount and eject commands that
uses HAL to do all the heavy lifting.

%package devel
Summary:  Development files for gnome-mount
Group: Development/GNOME and GTK+
Requires: %name = %version-%release
%description devel
Development files for gnome-mount

%if_enabled nautilus_extension
%package nautilus-properties
Summary:  Nautilus extention for gnome-mount
Group:    Graphical desktop/GNOME
Requires: %name = %version-%release
%description nautilus-properties 
Nautilus extention which adds property pages to volume and drive mount 
properties dialog for manipulating mount options.
%endif

%prep
%setup -q
%patch1 -p1
%patch2 -p1
# %patch3 -p1

%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p0
# need time for testing
#%patch14 -p0
#%patch15 -p0

%patch25 -p1 -b .unmount_nomedia
%patch27 -p1 -b .utf8_message
%patch28 -p1 -b .fstablock

%build
%autoreconf
%configure --disable-static \
%if_enabled nautilus_extension
	--enable-nautilus-extension \
%endif
	--disable-schemas-install

%make

%install
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%make_install install DESTDIR=%buildroot
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

rm -fr %buildroot%_bindir/gnome-{umount,eject}
ln -s gnome-mount %buildroot%_bindir/gnome-umount
ln -s gnome-mount %buildroot%_bindir/gnome-eject
rm -f %buildroot%nautilus_extdir/*.{la,a}

%find_lang %name

%post
%gconf2_install %name

%preun
if [ $1 = 0 ]; then
%gconf2_uninstall %name
fi

%files -f %name.lang
%doc AUTHORS COPYING ChangeLog NEWS README
%config %gconf_schemasdir/%name.schemas
%_bindir/*
%_man1dir/*
%_datadir/%name

%files devel
%_pkgconfigdir/*

%if_enabled nautilus_extension
%files nautilus-properties
%nautilus_extdir/*.so
%endif

%changelog
* Sun Dec 07 2008 Alexey Shabalin <shaba@altlinux.ru> 0.8-alt3
- fix undefined symbol in nautilus extension(link with libgconf)
- patches from Mandriva:
  + allow to unmount device with no media detected (Mdv bug #30157)
  + fix parsing mount message on non-english locale and ensure they are output correctly when using non-UTF8 locale
  + respect lock when device is in fstab (GNOME bug #551841) 

* Sun May 25 2008 Alexey Shabalin <shaba@altlinux.ru> 0.8-alt2
- 0.8 release
- fix crashes nautilus properties(#15772)
- add patches:
  + upstream bugs 511503, 426326, 511507
  + upstream bugs, but not applay (need test) 528551, 528559
  + patch1 for default mount options

* Sat Mar 22 2008 Alexey Shabalin <shaba@altlinux.ru> 0.8-alt1.svn20080225
- build for sisyphus

* Sat Mar 15 2008 Alexey Shabalin <shaba@altlinux.ru> 0.8-alt0.3.svn20080225
- redesigned spec
- change version (move suffix svn to Release)

* Thu Mar 13 2008 Sergey N. Yatskevich <syatskevich@altlinux.ru> 0.8.svn20080225-alt0.2
- correct stupid spec errors

* Wed Mar 12 2008 Sergey N. Yatskevich <syatskevich@altlinux.ru> 0.8.svn20080225-alt0.1
- 0.8 (svn20080225)