File alienblaster.spec of Package alienblaster

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

Name: 			alienblaster
Version:		1.1.0
Release:		1
Summary:		Action-loaded 2D arcade shooter game
License:		GPLv2
Group:			Amusements/Games/Action/Arcade
Source:			http://www.informatik.uni-bremen.de/~schwardt/alienblaster/%{name}-%{version}.tar.bz2
URL:			http://www.schwardtnet.de/alienblaster/
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:		gcc-c++
BuildRequires:		desktop-file-utils
Patch0:			alienblaster-1.1.0-SDL-headers-fix.patch
Patch1:			alienblaster-1.1.0_Makefile.diff
BuildRequires:		pkg-config
BuildRequires:		update-desktop-files
BuildRequires:		SDL-devel
BuildRequires:		SDL_mixer-devel

%description
alienblaster is an action-loaded 2D arcade shooter game. Your mission in the
game is simple: stop the invasion of the aliens by blasting them.
Simultaneous two-player mode is available.


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


%build
make


%install
mkdir -p %{buildroot}%{_gamesbindir}
install -m 755 alienBlaster %{buildroot}%{_gamesbindir}/%{name}

mkdir -p %{buildroot}/%{_gamesdatadir}/%{name}/images
install -m 644 images/* %{buildroot}/%{_gamesdatadir}/%{name}/images

mkdir -p %{buildroot}/%{_gamesdatadir}/%{name}/sound
install -m 644 sound/* %{buildroot}/%{_gamesdatadir}/%{name}/sound

mkdir -p %{buildroot}/%{_gamesdatadir}/%{name}/cfg
install -m 644 cfg/* %{buildroot}/%{_gamesdatadir}/%{name}/cfg

install -D -m 644 %{name}icon.png %{buildroot}/%{_icondir}/%{name}.png

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}
rm -rf %{_builddir}/%{name}-%{version}-%{release}-buildroot

%files
%defattr (-,root,root)
%doc README INSTALL CHANGELOG AUTHORS LICENSE VERSION
#%attr(0755,root,games)
%{_gamesbindir}/*
%{_gamesdatadir}/%{name}
%{_icondir}/%{name}.*
%{_datadir}/applications/*%{name}.desktop
openSUSE Build Service is sponsored by