Blob Blame History Raw
Name:           ballbuster
Version:        1.0
Release:        20%{?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
BuildRequires:  ClanLib1-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-1.0` -fpermissive"
convert -transparent black icon1.ico %{name}.png

%install
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 --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

%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
%doc COPYING credits.txt ExtremeUpdates.txt manual.html html
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png

%changelog
* Sun May 03 2015 Kalev Lember <kalevlember@gmail.com> - 1.0-20
- Rebuilt for GCC 5 C++11 ABI change

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Feb 10 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 1.0-16
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
- clean up spec to follow current guidelines
- fix desktop file to follow specification

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-14
- Rebuilt for c++ ABI breakage

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Feb 10 2011 Hans de Goede <hdegoede@redhat.com> - 1.0-12
- Fix building with gcc 4.6

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Nov 19 2009 Hans de Goede <hdegoede@redhat.com> 1.0-10
- Fix FTBFS, BuildRequire ClanLib1-devel (#538930)

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon May 18 2009 Hans de Goede <hdegoede@redhat.com> 1.0-8
- Rebuild for new ClanLib                        

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Feb 21 2009 Hans de Goede <hdegoede@redhat.com> 1.0-6
- Fix build with gcc 4.4

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0-5
- Autorebuild for GCC 4.3

* 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