%define name katoob
%define version 0.3
%define release 2mdk

Name: %name
Version: %version
Release: %release
Summary: Katoob, A Gtk2 light weight multilingual text editor
Group: Editors

Source: %name-%version.tar.bz2
Source10: %name-16.png.bz2
Source11: %name-32.png.bz2
Source12: %name-48.png.bz2
Patch: katoob_quit.patch.bz2

URL: http://www.arabeyes.org/project.php?proj=Katoob
BuildRoot: %_tmppath/%name-buildroot
License: GPL
Requires: libgtk+-x11-2.0_0 >= 2.0.6 gtk+2.0 >= 2.0.6
BuildRequires: gtk+2-devel >= 2.0.6 libgtk+-x11-2.0_0-devel >= 2.0.6
Provides: katoob

%description
Katoob is a light weight, multi lingual, BIDI-aware text editor. It supports 
opening and saving files in multiple encodings. The main support was for 
Arabic language but more languages are currently supported.


%prep
rm -rf $RPM_BUILD_ROOT

%setup -q
%patch -p1

%build
%configure
%make

%install
%makeinstall

mkdir -p $RPM_BUILD_ROOT%{_menudir}
cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
?package(%name): command="%{_bindir}/%{name}" needs="X11" \
icon="%{name}.png" section="Applications/Editors" \
title="Katoob" longtitle="Multi lingual text editor"
EOF

install -d $RPM_BUILD_ROOT/%{_miconsdir}
install -d $RPM_BUILD_ROOT/%{_iconsdir}
install -d $RPM_BUILD_ROOT/%{_liconsdir}
bzcat %{SOURCE10} > $RPM_BUILD_ROOT/%{_miconsdir}/%{name}.png
bzcat %{SOURCE11} > $RPM_BUILD_ROOT/%{_iconsdir}/%{name}.png
bzcat %{SOURCE12} > $RPM_BUILD_ROOT/%{_liconsdir}/%{name}.png


%post
%{update_menus}

%postun
%{clean_menus}

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr( 0644, root, root, 755)
%doc README ChangeLog AUTHORS COPYING TODO THANKS NEWS
%{_datadir}/locale/*/LC_MESSAGES/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%{_datadir}/katoob/*
%{_menudir}/* 
%{_iconsdir}/*                                      
# %{_liconsdir}/*                                           
# %{_miconsdir}/*
%defattr( 0755, root, root, 755)
%{_bindir}/*

%changelog
* Sun Oct 6 2002 Michael Mohammed Sameer <Uniball@linux-egypt.org> 0.3-2mdk
- Spec file for Mandrake 9.0
- More auditing for the spec files "Thanks Han Boetes <han@linux-mandrake.com>".
