Name:          pcmanfm
Version:       1.0
Release:       1.rc1%{?_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/pcmanfm-%{version}rc1.tar.gz
Patch0:         fix_dso_link.patch

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

BuildRequires:  automake >= 1.9
BuildRequires:  desktop-file-utils
BuildRequires:  gtk2-devel >= 2.16.0
BuildRequires:  glib2-devel >= 2.18.0
BuildRequires:  gettext
BuildRequires:  intltool >= 0.40
BuildRequires:  libfm-gtk-devel >= 0.1.99
BuildRequires:  libtool
BuildRequires:  libX11-devel
BuildRequires:  menu-cache-devel >= 0.3.2
BuildRequires:  pango-devel
BuildRequires:  perl-XML-Parser
BuildRequires:  pkgconfig

Requires:  libfm >= 0.1.99
Requires:  shared-mime-info
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 -n %{name}-%{version}rc1
%patch0 -p1

# permission fix
chmod 0644 [A-Z]*
sed -i 's/MimeType=x-directory\/normal;inode\/directory/MimeType=inode\/directory/g' \
    data/pcmanfm.desktop

%build
%configure --sysconfdir=/etc --enable-static=no
%{__make} %{?_smp_mflag}

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

%find_lang %{name}

desktop-file-install \
	--delete-original \
	--vendor "" \
	--remove-category 'Application' \
	--remove-category 'FileManager' \
	--add-category 'System;FileTools' \
	--dir ${RPM_BUILD_ROOT}/%{_datadir}/applications \
	${RPM_BUILD_ROOT}/%{_datadir}/applications/pcmanfm.desktop

%{_prefix}/lib/rpm/check-rpaths

%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
%{_sysconfdir}/xdg/pcmanfm/default/pcmanfm.conf
%{_bindir}/pcmanfm
%{_datadir}/%{name}/*
%{_datadir}/applications/*.desktop
%{_mandir}/man1/%{name}.1.gz

%changelog
* Tue Jul 10 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0-1.rc1
- new upstream release
- changed BuildRequires: libfm-gtk-devel >= 0.1.15 to 0.1.99
- changed Requires: libfm >= 0.1.15 to 0.1.99

* Tue Feb 07 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.10-2
- added patch0 to fix dso linking

* Sun Feb 05 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.10-1
- new upstream release
- dropt all patches
- rewrote whole spec
  - redifined BuildRequires and Requires
  - fixed summary(ja) and desciprition -l ja a little 

* 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
