File alienpool.spec of Package alienpool

# Now for the meat of the spec file
#
%define _icondir %{_datadir}/pixmaps/
%define _gamesbindir	%{_prefix}/games/
%define _gamesdatadir %{_datadir}/games/

Name:			alienpool
Summary:		Arcade-style mix of asteroids and pool
Version:		0.2.0
Release:		1
Source:			%{name}-%{version}.tar.bz2
URL:			http://mkorman.org/alienpool/
Group:          	Amusements/Games/Action/Arcade
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-buildroot
License:		GPLv2
BuildRequires:		desktop-file-utils
BuildRequires:		gcc-c++
BuildRequires:		pkg-config
BuildRequires:		update-desktop-files
BuildRequires:		SDL-devel
BuildRequires:		SDL_image-devel
BuildRequires:		SDL_mixer-devel
BuildRequires:		SDL_ttf-devel

%description
Alienpool is a space-shooter that is similar to both asteroids
and pool. Move a spaceship around the screen and shoot at aliens.
Aliens that have been shot bounce around the screen and hit other
aliens.


%prep
%setup -q


%build
%configure --bindir=%{_gamesbindir}
%{__make}


%install
install -D -m 2755 src/%{name} %{buildroot}/%{_gamesbindir}/%{name}
install -D -m 644 data/%{name}-48.png %{buildroot}/%{_icondir}/%{name}-48.png
install -D -m 644 data/%{name}.xpm %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm
install -D -m 644 doc/%{name}.6 %{buildroot}/%{_mandir}/man6/%{name}.6

mkdir -p %{buildroot}/var/games
install -m 664 %{name}.scores %{buildroot}/var/games

mkdir -p %{buildroot}/%{_gamesdatadir}/%{name}/sounds
install -m 644 data/sounds/*.wav %{buildroot}/%{_gamesdatadir}/%{name}/sounds
install -m 644 data/sounds/*.ogg %{buildroot}/%{_gamesdatadir}/%{name}/sounds

for i in alien alienbullet bullet dumbalien healthbonus hyperbonus ship shootbonus thrustship
do
 mkdir -p %{buildroot}/%{_gamesdatadir}/%{name}/sprites/$i
 install -m 644 data/sprites/$i/*.png %{buildroot}/%{_gamesdatadir}/%{name}/sprites/$i
 install -m 644 data/sprites/$i/info %{buildroot}/%{_gamesdatadir}/%{name}/sprites/$i
done

for i in h.png s.png starscape.png alienpool.xpm mainmenu.png VeraBI.ttf
do
 install -m 644 data/$i %{buildroot}/%{_gamesdatadir}/%{name}/$i
done

mkdir -p %{buildroot}%{_datadir}/applications

install -m 644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file -i %name Game ArcadeGame

%clean
%{__rm} -rf %{buildroot}

%files
%defattr (-,root,root)
%{_icondir}/%{name}*
%{_datadir}/applications/*%{name}.desktop
%{_gamesdatadir}/%{name}
%{_mandir}/man6/%{name}*
%doc README NEWS COPYING AUTHORS

%defattr(775,root,games)
%{_gamesbindir}/%{name}

%defattr(0664,root,games)
/var/games/%{name}.scores

%changelog
* Thu Dec 13 2007 David Bolt <davjam@davjam.org>
- Updated the spec file.
-  Now follows package naming conventions for Mandriva,
-  Fedora and openSUSE.
-
* Sun Oct 16 2005 David Bolt <davjam@davjam.org>
-
- first ported to SuSE 9.3
- repacked source using bzip2
- added a .desktop file
-
* Sat Mar 27 2004 Michael J. Korman <mike@taequin.org>
-
-	* Version 0.2.0.
-	* Added spaceship inertia for realism and challenge.
-	* Fixed bug that caused input events to be buffered during "Level"
-	  screen.
-	* Fixed bug that caused input events to be buffered during "Game Over"
-	  screen.
-	* Added icons that indicate which bonuses are currently active.
-	* Changed shapeship image to show when engines are being thrust.
-	* Added notification on game over if a high score has been achieved.
-	* Fixed bug that caused bonuses to carry over into a new game.
-
* Fri Jan 01 2004 Michael J. Korman <mike@taequin.org>
-
-	* Initial release.
-	* Put something in the README and AUTHORS files.