Blob Blame History Raw
Name: tecnoballz
Version: 0.92
Release: 1%{?dist}
Summary: A Brick Busting game

Group: Amusements/Games
License: GPLv3+
URL: http://linux.tlk.fr/games/TecnoballZ/
Source0: http://linux.tlk.fr/games/TecnoballZ/download/%{name}-%{version}.tgz
Source1: %{name}.xpm
Source2: %{name}.desktop
# Hans de Goede
Patch0: tecnoballz-0.92-no-smpeg.patch
Patch1: tecnoballz-0.92-dropsgid.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel 
BuildRequires: libvorbis-devel 
BuildRequires: mikmod-devel 
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme


%description
A exciting Brick Breaker with 50 levels of game and 11 special levels, 
distributed on the 2 modes of game to give the player a sophisticated 
system of attack weapons with an enormous power of fire that can be 
build by gaining bonuses. Numerous decors, musics and sounds 
complete this great game. This game was ported from the Commodore Amiga.


%prep
%setup -q
%patch0 -p1
%patch1 -p1

# FIX: set gamedir and scoredir
sed -i 's:gamesdir = $(prefix)/games:gamesdir = ${bindir}:' src/Makefile.in
sed -i 's:scoredir = /var/games/tecnoballz:scoredir = ${localstatedir}/games/%{name}:' Makefile.in


%build
%configure
# FIX: ovverride CXXFLAGS to pick up RPM_OPT_FLAGS
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS"


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

# FIX: install missing files
cp -fr src/TecnoballZ/levels-data.xml src/TecnoballZ/texts %{buildroot}%{_datadir}/%{name}

# install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor fedora         \
  --dir %{buildroot}%{_datadir}/applications \
  %{SOURCE2}

# install icon
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
install -p -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.xpm


%clean
rm -rf %{buildroot}


%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)
%attr(2755,root,games) %{_bindir}/tecnoballz
%{_datadir}/tecnoballz
%{_mandir}/man6/tecnoballz.6*
%{_datadir}/icons/hicolor/32x32/apps/%{name}.xpm
%{_datadir}/applications/fedora-%{name}.desktop
%doc AUTHORS CHANGES COPYING README
%attr(-,root,games) %config(noreplace) %{_localstatedir}/games/tecnoballz/tecnoballz.hi


%changelog
* Sat Dec 22 2007 Andrea Musuruane <musuruan@gmail.com> 0.92-1
- updated to v0.92
- license changed to GPLv3+
- changed description
- dropped French man page because it is outdated
- added SDL_image-devel to BR
- added a new patch by Hans de Goede to drop setgid privileges when not needed
- dropped no longer needed patches

* Sat Aug 25 2007 Andrea Musuruane <musuruan@gmail.com> 0.91-6
- changed license due to new guidelines
- removed %%{?dist} tag from changelog
- updated icon cache scriptlets to be compliant to new guidelines
- changed desktop categories from Game;ArcadeGame; to
  Game;ArcadeGame;BlocksGame; (resolves bugzilla #250940)

* Tue Apr 03 2007 Andrea Musuruane <musuruan@gmail.com> 0.91-5
- changed summary to avoid naming trademarks.

* Sun Apr 01 2007 Andrea Musuruane <musuruan@gmail.com> 0.91-4
- corrected silly error in the %%postun script

* Sat Mar 31 2007 Andrea Musuruane <musuruan@gmail.com> 0.91-3
- added a patch by Hans de Goede to drop setgid privileges when not needed
- changed icon cache scriptles to be compliant with updated guidelines
- changed vendor to fedora in desktop-file-install

* Wed Mar 25 2007 Andrea Musuruane <musuruan@gmail.com> 0.91-2
- moved from Livna to Fedora
- added a patch by Hans de Goede to fix compiling on 64 bits (Livna #1367)
- added a patch by Hans de Goede not to require smpeg (Livna #1367)
- changed desktop category to Game;ArcadeGame
- binary setgid 'games' in order to allow a shared scoreboard file
- cosmetic changes

* Sun Dec 17 2006 Andrea Musuruane <musuruan@gmail.com> 0.91-1
- initial build for Livna based on Vine Linux package
- used icon file from Debian package
- used patches from Debian and Vine Linux packages
- used a patch by BoredByPolitics via happypenguin.org to fix building
- used a patch by Martin Michlmayr to fix compiling with gcc 4.1 (Debian
  #355841)
- used a patch from upstream to fix segfault into configfile.cc file