Name: biloba
Version: 0.6
Release: 1%{?dist}
Summary: A tactical board game
Group: Amusements/Games
License: GPLv2+
URL: http://pagesperso-orange.fr/biloba/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1: biloba.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils ImageMagick SDL_image-devel SDL_mixer-devel
Requires: hicolor-icon-theme
%description
Biloba is a very innovating tactical board game. It than can be played
by 2, 3 or 4 players and against the computer (AI). After installing the
game you will be abble to play on the same computer or online against
your opponents.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
iconv -f iso-8859-1 -t utf-8 ChangeLog -o ChangeLog.char
mv ChangeLog.char ChangeLog
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{64x64,32x32,16x16}/apps
cp -p biloba_icon.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/biloba.png
convert -scale 32x32 biloba_icon.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/biloba.png
convert -scale 16x16 biloba_icon.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/biloba.png
desktop-file-install --vendor="fedora" \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/??x??/apps/%{name}.png
%{_datadir}/applications/fedora-%{name}.desktop
%changelog
* Sun Mar 09 2008 RafaĆ Psota <rafalzaq@gmail.com> - 0.6-1
- Initial release