Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > bfe7a3a0bfec4cf0c608f69f5ddac5ea > files > 3

jools-0.20-4mdk.src.rpm

Name:		jools
Summary:	Graphical puzzle game
Version: 0.20
Release: 4mdk
Url:		http://www.eecs.umich.edu/~pelzlpj/jools/
Source0:	%{name}-%{version}.tar.bz2
Source1:	%{name}-%{version}-sys.patch.bz2
#Source2:	%{name}-48.png
#Source3:	%{name}-32.png
#Source4:	%{name}-16.png
Group:		Games/Puzzles
License:	GPL
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires:	pygame
BuildArch:      noarch

%description
Jools is a graphical puzzle game in the tradition of Tetris.
In a nutshell, the goal is to swap adjacent jools (jewels) within a grid,
in order to create rows of three or more of a kind.
These jools will then disappear, and more will fall to fill their places.
Jools features nifty 3D rendered graphics.

%prep
%setup -q
perl -pi -e "s,share,share/games,g" setup.py

%build

%install
rm -rf $RPM_BUILD_ROOT
python setup.py install --root=$RPM_BUILD_ROOT

rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
find $RPM_BUILD_ROOT%{_gamesdatadir}/%{name} -name '.arch-ids' -o -name '.placeholder' | xargs rm -rf

install -d -m 755 $RPM_BUILD_ROOT%{_gamesbindir}
mv $RPM_BUILD_ROOT%{_bindir}/%{name} $RPM_BUILD_ROOT%{_gamesbindir}
rmdir $RPM_BUILD_ROOT%{_bindir}

(cd $RPM_BUILD_ROOT%{_libdir}/python%pyver/site-packages/%{name} && bzip2 -dc %{SOURCE1} | patch -p4)

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/Puzzles" title="Jools" longtitle="Graphical puzzle game" needs="x11"
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_menus

%postun
%clean_menus

%files
%defattr(-,root,root,755)
%doc COPYING ChangeLog README doc/manual.html
%{_gamesbindir}/%{name}
%dir %{_libdir}/python%pyver/site-packages/%{name}
%{_libdir}/python%pyver/site-packages/%{name}/*
%dir %{_gamesdatadir}/%{name}
%{_gamesdatadir}/%{name}/*
%{_menudir}/%{name}
#%{_liconsdir}/%{name}.png
#%{_iconsdir}/%{name}.png
#%{_miconsdir}/%{name}.png

%changelog
* Sun Dec 05 2004 Michael Scherer <misc@mandrake.org> 0.20-4mdk
- Rebuild for new python

* Sat Dec 04 2004 Michael Scherer <misc@mandrake.org> 0.20-3mdk 
- correct menu
- use a macro for python version
- use noarch

* Tue May  4 2004 Olivier Blin <blino@mandrake.org> 0.20-2mdk
- modify setup.py to install directly in share/games
- use --root option of setup.py instead of some dark power
  (GProg poutre more than AEI)

* Mon May  3 2004 Olivier Blin <blino@mandrake.org> 0.20-1mdk
- initial release