%define dataversion 0.9.2

Summary:	a Linux port of wonderful puzzle game Fish Fillets
Summary(ja):	海をモチーフにした倉庫番形式のパズルゲーム 
Name:		fillets-ng
Version:	0.9.2
Release:	1%{?_dist_release}
Source0:	%{name}-%{version}.tar.gz
Source1:	%{name}-data-%{dataversion}.tar.gz
License:	GNU GENERAL PUBLIC LICENSE Version 2
Group:		Applications/Games
URL:		http://fillets.sourceforge.net/

Requires:	SDL SDL_mixer SDL_image SDL_ttf
Requires:	lua 
BuildRequires:	SDL-devel SDL_mixer-devel SDL_image-devel SDL_ttf-devel 
BuildRequires:	lua-devel 

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Obsoletes:	fillets-ng-data < 0.9.0

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	munepi

%description
Fish Fillets NG is a Linux port of wonderful puzzle game Fish Fillets from ALTAR interactive.

%description -l ja
Fish Fillets NG は，ALTAR interactive による不可思議なパズルゲーム 
Fish Fillets の Linux port です．


%prep
%__rm -rf ${RPM_BUILD_ROOT}
%setup -q

%build
%configure --datadir=%{_datadir}/games/fillets-ng
%{__make} %{?_smp_mflags}

%install
%__rm -rf ${RPM_BUILD_ROOT}
%makeinstall

# dataファイルのインストール
%__install -d ${RPM_BUILD_ROOT}/%{_datadir}/games
tar zxf %{SOURCE1} -C ${RPM_BUILD_ROOT}/%{_datadir}/games
%__mv ${RPM_BUILD_ROOT}/%{_datadir}/games/%{name}-data-%{dataversion} \
    ${RPM_BUILD_ROOT}/%{_datadir}/games/%{name}

%__install -d ${RPM_BUILD_ROOT}/%{_datadir}/pixmaps
%__install -m 644 ${RPM_BUILD_ROOT}/%{_datadir}/games/%{name}/images/icon.png \
    ${RPM_BUILD_ROOT}/%{_datadir}/pixmaps/fillets.png
%__install -d ${RPM_BUILD_ROOT}/%{_datadir}/applications

cat >  ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}.desktop <<EOF
[Desktop Entry]
Name=Fish Fillets - Next Generation
Comment=Fish Fillets is strictly a puzzle game.
TryExec=fillets
Exec=/usr/bin/fillets systemdir="%{_datadir}/games/fillets-ng"
Icon=fillets.png
Terminal=false
Type=Application
Categories=GNOME;Application;Game
EOF


%clean
%__rm -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%{_bindir}/fillets
%{_datadir}/pixmaps/fillets.png
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man6/fillets.6.gz
%{_datadir}/games/%{name}/


%changelog
* Sun Nov 01 2009 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.2-1
- new upstream release

* Sun Aug 02 2009 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.1-1
- new upstream release
- added Summary(ja) tag
- obsoleted fillets-ng-data < 0.9.0

* Sun Jan 25 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.8.1-1
- new upstream release

* Thu Sep 25 2008 Shu KONNO <owa@bg.wakwak.com> 0.8.0-1vl5
- applied new versioning policy, spec in utf-8

* Sun Jan 27 2008 Shu KONNO <owa@bg.wakwak.com> 0.8.0-0vl4
- rebuilt

* Sun Jan 13 2008 Shu KONNO <owa@bg.wakwak.com> 0.8.0-0vl3
- added "--datadir=%%{_datadir}/games/fillets-ng" to configure

* Mon Jan 07 2008 Shu KONNO <owa@bg.wakwak.com> 0.8.0-0vl2
- new upstream release
- updated desktop file

* Sun Aug 5 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.7.4-0vl1
- initial build for Vine Linux 4.1
 - new upstream release for Vine Linux 4.1
 - drop fillets-ng-0.7.4-lua-pkgconfig.patch

* Fri Dec 16 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.7.3-0vl1
- update base system to 0.7.3 (but data version is 0.7.1)

* Sat Jul 23 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.7.1-0vl1
- initial build for Vine Linux 3.2

# end of file
