%define		enable_inotify	0
%define		enable_hal	0

Name:           pcmanfm
Version:        0.5.2
Release:        2%{?_dist_release}
Summary:	Extremly fast and lightweight file manager
Summary(ja):	とても高速で軽量なファイルマネージャ

Group:          Applications/System
License:	GPLv2+
URL:            http://pcmanfm.sourceforge.net
Source0:        http://osdn.dl.sourceforge.net/sourceforge/pcmanfm/%{name}-%{version}.tar.bz2
Patch0:		pcmanfm-0.5-kill-find-immediately.patch
Patch1:		pcmanfm-0.5-fix-str-fmt.patch
Patch2:		ca_po.patch
Patch3:		pcmanfm-0.5.2-makefile.patch

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

BuildRequires:  automake >= 1.9
BuildRequires:  gtk2-devel >= 2.14
BuildRequires:  gamin-devel
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
BuildRequires:  intltool
BuildRequires:  startup-notification-devel
BuildRequires:  dbus-devel
BuildRequires:  dbus-glib-devel
BuildRequires:	cairo-devel

Requires:       gtk2 >= 2.14, gamin, dbus-glib
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils


%description
PCMan File Manager is an extremly fast and lightweight file manager 
which features tabbed browsing and user-friendly interface.

%description -l ja
PCMan File Manager はタブブラウズとユーザーフレンドリーな
インターフェイスを特色とするとても高速で軽量なファイルマネージャです。

%prep
%setup -q
%patch0 -p1 -b .search_hang
%patch1 -p0
%patch2 -p1
%patch3 -p1
chmod 644 INSTALL COPYING

%build
autoreconf -if
%configure \
%if %{enable_hal} >= 1
	--enable-hal \
%else
	--disable-hal \
%endif
%if %{enable_inotify} >= 1
	--enable-inotify
%else
	--disable-inotify
%endif

%{__make} %{?_smp_mflags} -k


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
desktop-file-install \
  --delete-original \
  --vendor vine \
  --dir ${RPM_BUILD_ROOT}/%{_datadir}/applications \
  ${RPM_BUILD_ROOT}/%{_datadir}/applications/pcmanfm.desktop

%clean
rm -rf $RPM_BUILD_ROOT


%post
update-desktop-database %{_datadir}/applications >/dev/null 2>&1 || :


%postun
update-desktop-database %{_datadir}/applications >/dev/null 2>&1 || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README TODO
%{_bindir}/pcmanfm
%{_datadir}/%{name}/*
%{_datadir}/applications/*.desktop
%{_datadir}/mime/packages/*.xml
%{_datadir}/pixmaps/*

%changelog
* Sat Jan 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.5.2-2
- remove BuildRequires: hal-devel
- remove Requires: hal
- change configure option (--disable-hal)
- add Patch3 (pcmanfm-0.5.2-makefile.patch)

* Sun Nov 1 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5.2-1
- new upstream release
- added Patch2 to fix build error

* Fri Jun 12 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5.1-1vl5
- new upstream release
- added BuildRequires:  intltool
- dropt Source1

* Sat Apr 4 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5-2vl5
- added Patch1 (import Mandriva Package)
- added BuildRequires:	cairo-devel
- replaced ja.po: from upstream repository
- fixed BuildRoot tag

* Mon Mar 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5-1vl5
- initial build for VineSeed
- Update to 0.5
- added Patch0 (import Fedora package)

* Sun Dec 03 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.2.2-1
- Update to 0.3.2.2

* Sun Oct 15 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.2.1-1
- Update to 0.3.2.1

* Sat Oct 14 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.2-1
- Update to 0.3.2

* Sun Oct 01 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.2-0.3.rc1
- Update to 0.3.2-rc1

* Sat Sep 30 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.2-0.2.beta3
- Update to 0.3.2-beta3

* Wed Sep 27 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.2-0.1.beta2
- Update to 0.3.2-beta2

* Sun Aug 27 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.1-0.2.beta2
- Update to 0.3.1-beta2

* Sun Aug 27 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.1-0.1.beta
- Update to 0.3.1-beta

* Tue Aug 22 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.0.2-1
- Update to 0.3.0.2 release

* Sun Aug 20 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.0.1-1
- Update to 0.3.0.1 release

* Sun Aug 20 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.0-1
- Update to 0.3.0 release

* Fri Aug 18 2006 Chung-Yen Chang <candyz0416@gmail.com> - 0.3.0-0.1.beta3
- Initial RPM release
