+# TODO
+# - unpackaged: /etc/xdg/pcmanfm/default/pcmanfm.conf
+%define libfm 0.1.16
Summary: File manager for GTK
Summary(pl.UTF-8): Zarządca plików dla GTK
Name: pcmanfm
-Version: 0.4.0
+Version: 0.9.9
Release: 1
-License: GPL v2
+License: GPL v2+
Group: X11/Applications
-Source0: http://dl.sourceforge.net/pcmanfm/%{name}-%{version}.tar.gz
-# Source0-md5: d4a528e37605df0806b5f1bd94d85604
+Source0: http://downloads.sourceforge.net/pcmanfm/%{name}-%{version}.tar.gz
+# Source0-md5: f31ed6defb600f7046a456220d8efa3a
+Patch0: %{name}-werror.patch
URL: http://pcmanfm.sourceforge.net/
BuildRequires: autoconf >= 2.53
BuildRequires: automake
-BuildRequires: dbus-glib-devel
+BuildRequires: dbus-glib-devel >= 0.31
BuildRequires: fam-devel
+BuildRequires: gettext-devel
BuildRequires: gtk+2-devel >= 2:2.8
-BuildRequires: hal-devel
-BuildRequires: libselinux-devel
+BuildRequires: hal-devel >= 0.5.0
+BuildRequires: intltool
+BuildRequires: libfm-devel >= %{libfm}
+BuildRequires: libtool
+BuildRequires: menu-cache-devel >= 0.3.2
BuildRequires: pkgconfig
BuildRequires: startup-notification-devel
+Requires(post,postun): desktop-file-utils
+Requires(post,postun): shared-mime-info
Requires: gnome-icon-theme
-Requires: shared-mime-info
+Requires: libfm >= %{libfm}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q
+%patch0 -p1
%build
+%{__intltoolize}
+%{__libtoolize}
%{__aclocal}
%{__autoconf}
+%{__autoheader}
%{__automake}
%configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_desktopdir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-cp -a %{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}
-mv $RPM_BUILD_ROOT%{_datadir}/locale/pt{_PT,}
-
%find_lang %{name} --all-name
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+%update_desktop_database
+
+%postun
+%update_desktop_database_postun
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS TODO
%attr(755,root,root) %{_bindir}/%{name}
%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/*.rules
-%{_datadir}/%{name}/icons
%{_datadir}/%{name}/ui
-%{_datadir}/mime/packages/libmimetype.xml
-%{_desktopdir}/%{name}.desktop
-%{_pixmapsdir}/%{name}.png
+%{_desktopdir}/%{name}*.desktop