Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 7c29a3fe9974597b8da2da762dd587d2 > files > 7

fillets-ng-0.6.0-2mdk.src.rpm

%define name fillets-ng
%define version 0.6.0
%define release 2mdk

Summary: Fish Fillets NG
Name:    %{name}
Version: %{version}
Release: %{release}
License: GPL 
Group:   Games/Arcade
URL:     http://fillets.sourceforge.net/
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-data-%{version}.tar.gz
Source2: %{name}-data-cs-%{version}.tar.gz
Source3: %{name}-48.png
Source4: %{name}-32.png
Source5: %{name}-16.png
# liblua4 doesn't work, but this is not good on amd64
BuildRequires: liblua5-devel
BuildRequires: libSDL-devel, libSDL_mixer-devel, libSDL_image-devel
BuildRequires: libSDL_ttf-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%description
Fish Fillets NG is strictly a puzzle game. The goal in every of the seventy
levels is always the same: find a safe way out. The fish utter witty remarks
about their surroundings, the various inhabitants of their underwater realm
quarrel among themselves or comment on the efforts of your fish. The whole
game is accompanied by quiet, comforting music.

%package data
Summary:   Data files for the Fish Fillets NG game
Group:     Games/Arcade
Requires:  %{name} = %{version}
License:   GPL

%description data
Data files for the Fish Fillets NG game.

%package data-cs
Summary:   Czech sound files for the Fish Fillets NG game
Group:     Games/Arcade
Requires:  %{name}
License:   GPL
Requires:  %{name} = %{version}, %{name}-data = %{version}, locales-cs

%description data-cs
Czech sound files for the Fish Fillets NG game.

%prep
%setup -q

%build
# Doesn't work without --with-lua, don't know why
%configure --with-lua=/usr
make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

# Fix the bin dir of the fillets file and rename to fillets-ng
mv $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/%{_gamesbindir}
mv $RPM_BUILD_ROOT/%{_gamesbindir}/fillets{,-ng}

# Menu entry
mkdir -p $RPM_BUILD_ROOT/%{_menudir}
cat > $RPM_BUILD_ROOT/%{_menudir}/%{name} << EOF
?package(%{name}): \
command="%{_gamesbindir}/%{name}" \
icon="%{name}.png" \
section="More Applications/Games/Arcade" \
title="Fish Fillets NG" \
longtitle="Fish Fillets NG" \
needs="x11"
EOF

# Icon installation
install -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png
install -D -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
install -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png

# Fix the man page
mv $RPM_BUILD_ROOT/%{_mandir}/man6/fillets{.6,-ng.6}
bzip2 $RPM_BUILD_ROOT/%{_mandir}/man6/%{name}.6

# Unpack common data files
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/games/%{name}
tar xfz %{SOURCE1} -C $RPM_BUILD_ROOT/%{_datadir}/games/%{name}/ --strip-path=1
# Create common data files list
SAVEPWD=`pwd`
cd $RPM_BUILD_ROOT/%{_datadir}/games/%{name}
# COPYING is in %doc
rm -f COPYING
find -type f -exec echo "%{_datadir}/games/%{name}/{}" \; > $SAVEPWD/%{name}-data.files
find -type d -exec echo "%dir %{_datadir}/games/%{name}/{}" \; >> $SAVEPWD/%{name}-data.files
cd $SAVEPWD
# Unpack additional languages
tar xfz %{SOURCE2} -C $RPM_BUILD_ROOT/%{_datadir}/games/%{name}/ --strip-path=1
# COPYING is in %doc
rm -f $RPM_BUILD_ROOT/%{_datadir}/games/%{name}/COPYING 

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_menus

%postun
%update_menus

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
%{_gamesbindir}/%{name}
%{_mandir}/man6/*
%{_menudir}/%{name}
%{_liconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png

%files -n %{name}-data -f %{name}-data.files
%defattr(-,root,root)

%files -n %{name}-data-cs
%defattr(-,root,root)
%{_gamesdatadir}/%{name}/sound/*/cs
%{_gamesdatadir}/%{name}/sound/share/*/cs

%changelog
* Mon Nov  1 2004 Michael Scherer <misc@mandrake.org> 0.6.0-2mdk
- Buildrequires

* Wed Oct 20 2004 Robert Vojta <robert.vojta@mandrake.cz> 0.6.0-1mdk
- Fish Fillets NG 0.6.0 release