Name: ballbuster
Version: 1.0
Release: 4%{?dist}
Summary: Move the paddle to bounce the ball and break all the bricks
Group: Amusements/Games
License: GPLv2+
URL: http://www.patrickavella.com/ballbuster.shtml
Source0: http://www.patrickavella.com/BallBusterX.zip
Source1: %{name}.desktop
Patch0: ballbuster-unix.patch.gz
Patch1: ballbuster-1.0-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ClanLib-devel desktop-file-utils ImageMagick
Requires: hicolor-icon-theme opengl-games-utils
%description
Game inspired by one of the great classics. The purpose of the game is to
remove all the bricks on the screen, by hitting them with a ball. You can
control the ball by bouncing it back at the bricks with a paddle which you
control with your mouse. The game features: A built in level editor, 20 power
ups and special effects (particle, alpha, rotating, and zooming).
%prep
%setup -q -c
%patch0 -p1 -z .unix
%patch1 -p1 -z .gcc43
sed -i 's/\r//g' COPYING credits.txt ExtremeUpdates.txt manual.html html/*
%build
make %{?_smp_mflags} PREFIX=%{_prefix} \
CFLAGS="$RPM_OPT_FLAGS `pkg-config --cflags clanCore-0.8`"
convert -transparent black icon1.ico %{name}.png
%install
rm -rf $RPM_BUILD_ROOT
make install PREFIX=$RPM_BUILD_ROOT%{_prefix}
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper
# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{name}.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
%clean
rm -rf $RPM_BUILD_ROOT
%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
%files
%defattr(-,root,root,-)
%doc COPYING credits.txt ExtremeUpdates.txt manual.html html
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%changelog
* Fri Jan 4 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-4
- Fix building with gcc 4.3
* Tue Sep 25 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-3
- Use opengl-games-utils wrapper to show error dialog when DRI is missing
* Sun Aug 5 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-2
- Update License tag for new Licensing Guidelines compliance
* Tue Oct 10 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-1
- Initial Fedora Extras package