%global minorversion 0.8

Name:           thunar-volman
Summary:        Thunar extension for volume management
Version:        0.8.0
Release:        1%{?_dist_release}

Group:          User Interface/Desktops
License:        LGPLv2+
URL:            http://goodies.xfce.org/projects/thunar-plugins/thunar-volman

Source0:        http://archive.xfce.org/src/xfce/%{name}/%{minorversion}/%{name}-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildRequires:	Thunar-devel >= 1.2.0
BuildRequires:	libexo-devel >= 0.8.0
BuildRequires:	glib2-devel >= 2.18.0
BuildRequires:	gtk2-devel >= 2.24.0
BuildRequires:	libgudev1-devel >= 145
BuildRequires:	libxfce4ui-devel >= 4.10.0
BuildRequires:	libxfce4util-devel >= 4.10.0
BuildRequires:	xfconf-devel >= 4.10.0

%description
thunar-volman is an extension for the Thunar File Manager, which enables
automatic management of removable drives and media. For example, if
thunar-volman is installed and configured properly, and you plug in your
digitcal camera, it will automatically spawn your preferred photo application
and import the new pictures from your camera.


%prep
%setup -q

%build
%configure --disable-static
make %{?_smp_mflags}


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

%find_lang %{name}


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database %{_datadir}/applications &> /dev/null || :

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
    gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog NEWS README 
%{_bindir}/thunar-volman
%{_bindir}/thunar-volman-settings
%{_datadir}/applications/thunar-volman-settings.desktop
%{_datadir}/icons/hicolor/*/apps/*


%changelog
* Thu Jun 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.8.0-1
- initial build for Vine Linux

