File afternoonstalker.spec of Package afternoonstalker

# Now for the meat of the spec file
#
Name:			afternoonstalker
Version:		1.2.0
Summary:		A Night Stalker(TM) clone
License:		GPLv2
URL:			http://sarrazip.com/dev/%{name}.html
Group:			Amusements/Games/Action/Arcade
Release:		0
Source0:		%{name}-%{version}.tar.gz
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:		desktop-file-utils
BuildRequires:		gcc-c++
BuildRequires:		libtool
BuildRequires:		pkg-config
BuildRequires:		update-desktop-files
BuildRequires:		libSDL2-devel
BuildRequires:		libSDL2_image-devel
BuildRequires:		libSDL2_mixer-devel
BuildRequires:		libSDL2_gfx-devel
BuildRequires:		libSDL2_ttf-devel
BuildRequires:		flatzebra-devel
Requires:		flatzebra

%description
Clone of the Intellivision game Night Stalker.  You are in a
two-dimensional maze in which you are attacked by robots that
shoot at you and that you must shoot down.  You must pick up a
gun somewhere in the maze in order to have a few bullets to shoot.
Avoid the spiders and the bats, which can paralyze you long enough
for a robot to come and shoot you.  The bunker in the center is
your only protection.

%prep
%setup -q

%build
#%suse_update_config -f
%configure
%{__make} %{?jobs:-j%jobs}

%install
make install DESTDIR="%{buildroot}" INSTALL="%{__install} -p"
rm -rf %{buildroot}%{_datadir}/doc/%{name}-%{version}
rm %{buildroot}/%{_datadir}/applications/*.desktop

cat <<_EOF_ >src/%{name}.desktop
[Desktop Entry]
Type=Application
Name=Afternoon Stalker
GenericName=Afternoon Stalker
Categories=Game;ArcadeGame;
Comment=A robot-killing game
Exec=afternoonstalker
Icon=afternoonstalker
Terminal=false
_EOF_

install -D -m644 src/%{name}.desktop %{buildroot}/%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file -i %{name} -n

%clean
%{__rm} -rf %{buildroot}
%{__rm} -rf %{_builddir}/%{name}-%{version}-%{release}-buildroot

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO
%{_datadir}/applications/*%{name}.desktop
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/pixmaps/*
%{_datadir}/sounds/%{name}
%{_mandir}/man*/*

%changelog
* Wed May 20 2015 Huaren Zhong <huaren.zhong@gmail.com> 1.1.5
- Rebuild for Fedora
openSUSE Build Service is sponsored by