Name: bugsquish
Version: 0.0.6
Release: 2%{?_dist_release}

Summary: Bugs are trying to suck blood out of your arm!
Summary(ja): 虫たちがあなたの腕から血を吸おうとしています!
License: GPL
URL: http://newbreedsoftware.com/bugsquish
Group: Applications/Games
Source0: ftp://ftp.sonic.net/pub/users/nbs/unix/x/bugsquish/bugsquish-%{version}.tar.bz2
#Source1: %{name}.6
Source2: %{name}.desktop

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: SDL-devel SDL_image-devel SDL_mixer-devel

Vendor: Project Vine
Distribution: Vine Linux
Packager: OOI Keita <ooik.ovwqlsjxcqwg4dc@privango.jp>

%description
"Bug Squish" is an action game not unlike light gun arcade games, but
played with a mouse. It's loosely based on a MacOS game whose name I
can't recall.

Bugs are trying to suck blood out of your arm! Squish them with with
your fly swatter before you run out of blood.

%description -l ja
"Bug Squish" は、光線銃の代わりにマウスを使ってプレイする
アクションゲームです。
名前は忘れましたが、MacOS 用のゲームを大まかなベースとしています。

虫たちがあなたの腕から血を吸おうとしています! その前にハエ叩きで奴らを
潰してください。

%prep
%setup -q

%build
make DATA_PREFIX=%_datadir/%name/ BIN_PREFIX=%{_bindir}

%install
rm -rf $RPM_BUILD_ROOT

# install bin
install -D %name $RPM_BUILD_ROOT/%_bindir/%name

#install data
install -d $RPM_BUILD_ROOT%_datadir/%name
cp -a data/{images,sounds,music} $RPM_BUILD_ROOT%_datadir/%name/

#install icon
mkdir -p $RPM_BUILD_ROOT%_datadir/pixmaps
install -D -pm644 data/images/bugsquish-icon.xpm $RPM_BUILD_ROOT%_datadir/pixmaps/%{name}.xpm

#install man
#mkdir -p $RPM_BUILD_ROOT%_mandir/man6/
#install -D -pm644 %{SOURCE1} $RPM_BUILD_ROOT%_mandir/man6/%{name}.6

#install desktop
mkdir -p $RPM_BUILD_ROOT%_datadir/applications
install -D -pm644 %{SOURCE2} $RPM_BUILD_ROOT%_datadir/applications/%{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%files
%doc AUTHORS.txt CHANGES.txt README.txt
%{_bindir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/pixmaps/*.xpm
#%_mandir/man6/*
%{_datadir}/applications/*.desktop

%changelog
* Fri Sep 19 2008 Shu KONNO <owa@bg.wakwak.com> 0.0.6-2vl5
- applied new versioning policy, spec in utf-8

* Mon Oct  9 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.0.6-1vl2
- rebuilt for Vine Linux 4.0
- changed Group to Applications/Games

* Wed Feb 9 2005 OOI Keita <ooik.ovwqlsjxcqwg4dc@privango.jp> - 0.0.6-1vl1
- first spec for vine
- ja summary and description from deb
- add desktop