Name: 		Thunar
Summary: 	modern file manager
Summary(ja): 	近代的なファイルマネージャ
Version: 	1.2.2
Release: 	1%{?_dist_release}

Group: 		User Interface/Desktops
License:	GPLv2 and LGPLv2
URL: 		http://www.xfce.org/

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

BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
BuildRequires:  dbus-glib-devel >= 0.34
BuildRequires:  glib2-devel >= 2.18.0
BuildRequires: 	gtk2-devel >= 2.14.0
BuildRequires:  libexif-devel >= 0.6.0
BuildRequires:  libexo-devel >= 0.6.0
BuildRequires:  libgudev1-devel >= 145
BuildRequires:  libnotify-devel >= 0.4.0
BuildRequires:  libSM-devel 
BuildRequires:  libxfce4ui-devel >= 4.8.0
BuildRequires:  libxfce4util-devel >= 4.8.0
BuildRequires:  pcre-devel >= 6.0
BuildRequires:  pkgconfig
BuildRequires:  startup-notification-devel >= 0.4
BuildRequires:  xfce4-panel-devel >= 4.7.0
BuildRequires:  xfconf

Obsoletes:      xffm

%description
Thunar is a modern file manager for the Unix/Linux desktop, aiming to be
easy-to-use and fast.

%package devel
Summary: Development headers for Thunar
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: glib2-devel >= 2.18.0
Requires: gtk2-devel >= 2.14.0

%description devel
This package includes the header files you will need to build
plugins for Thunar.

%prep
%setup -q

%build
%configure --enable-silent-rules
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'

## remove unuse files
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT/%{_libdir}/thunarx-2/*.la
rm -rf $RPM_BUILD_ROOT/%{_libdir}/xfce4/panel/plugins/*.la
rm -rf $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/icon-theme.cache

rm -rf _docs_to_include
mkdir -p _docs_to_include
mv $RPM_BUILD_ROOT%{_docdir}/%{name}/* _docs_to_include
#cp AUTHORS COPYING COPYING.LIB ChangeLog FAQ HACKING NEWS README THANKS TODO $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}-%{version}

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor

%posttrans 
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

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

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog FAQ NEWS README THANKS
%doc _docs_to_include/*
%{_sysconfdir}/xdg/Thunar
%{_bindir}/*
%{_libdir}/lib*.so.*
%dir %{_libdir}/Thunar
%{_libdir}/Thunar/*
%dir %{_libdir}/thunarx-2
%{_libdir}/thunarx-2/*.so
%{_libdir}/xfce4/panel/plugins/lib*.so
%{_datadir}/Thunar
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/*.service
%{_datadir}/icons/hicolor/*
%{_datadir}/pixmaps/Thunar
#{_datadir}/thumbnailers
%{_datadir}/xfce4/panel-plugins/thunar-tpa.desktop
%{_mandir}/man1/Thunar*

%files devel
%defattr(-,root,root)
%{_includedir}/thunarx-2
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
#%{_datadir}/gtk-doc/html/thunar-vfs
%{_datadir}/gtk-doc/html/thunarx

%changelog
* Sun Aug 21 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.2.2-1
- new upstream release
- built with libnotify-0.7.3 (VineSeed)

* Tue Mar 29 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.2.0-1
- new upstream release

* Sun May 23 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.2-1
- new upstream release
- built with new toolchain

* Sat May 23 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.1-1
- new upstream release
- split devel subpackage

* Mon Sep 29 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.9.0-3
- add BuildRequires: xfce4-panel
  (needed to build thunar-tpa.desktop)

* Thu Sep 25 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9.0-2vl5
- added BuildRequires: libexo-devel, dbus-glib-devel, hal-devel

* Sat Sep 20 2008 Shu KONNO <owa@bg.wakwak.com> 0.9.0-1vl5
- applied new versioning policy
- removed *.la

* Sun Dec 23 2007 UECHI Yasumasa <uechi@potaway.net> 0.9.0-0vl2
- new upstream release.

* Sun Jul 29 2007 UECHI Yasumasa <uechi@potaway.net> 0.8.0-0vl2
- build for VineSeed

* Sat Jul 28 2007 UECHI Yasumasa <uechi@potaway.net> 0.8.0-0vl1
- initial release

