#this is to allow easy relocation eg to /usr/local
%define prefix /usr
%define _bindir %{prefix}/bin
%define _libdir %{prefix}/lib

Name: emelfm2
Version: 0.1.4
Release: 1
Summary: Gtk+2 file manager with two-panel format
License: GPL
URL: http://emelfm2.org
Group: File tools

Requires: gtk+2.0 >= 2.4 file findutils >= 4.2 grep sed
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gtk+2-devel
BuildRequires: gcc >= 3.2

%description
emelFM2 is a file manager with the efficient two-pane format,
featuring:
  o Simple interface
  o Bookmarks and history lists 
  o Flexible filetyping scheme
  o Multiple actions selectable for each filetype 
  o Filename, size, and date Filters
  o Built-in command line
  o Configurable keyboard bindings
  o Configurable toolbars
  o Runtime loadable plugins

It is the Gtk+2 port of emelFM.

%package -n %{name}-i18n
Summary: Translation files for emelFM2
Group: File tools

%description -n %{name}-i18n
This package contains translation files which may be installed
to allow emelFM2 to use non-english names in its user-interface

%prep
%setup -q

%build
#adjust the make parameters to suit - see file INSTALL
%make DOCS_VERSION=1 USE_LATEST=1 CFLAGS="-O2 -march=i586"

%install
rm -rfd %{buildroot}
%make install PREFIX=%{buildroot}%{prefix}
%make install_i18n PREFIX=%{buildroot}%{prefix}

%find_lang %{name}

rm -rfd %{buildroot}%{prefix}/share/doc

mkdir -p %{buildroot}%{_bindir}
install -m 755 %{name} %{buildroot}%{_bindir}  

%clean
rm -rfd %{buildroot}
rm -rfd %{_builddir}/%{name}-%{version}

%files
%defattr (-,root,root)
%{_bindir}/*
%{prefix}/share/pixmaps/*
%{prefix}/share/applications/*
%{prefix}/share/application-registry/*
%dir %_libdir/%{name}
%dir %_libdir/%{name}/plugins
%{_libdir}/%{name}/plugins/e2p*.so
%defattr(644,root,root,755)
%doc docs/ACTIONS docs/CHANGELOG docs/CONFIGURATION docs/CREDITS docs/GPL docs/README docs/TODO docs/USAGE

%files -n %{name}-i18n -f %name.lang
%defattr(-, root, root)

%changelog
