%define name pinball %define version 0.3.1 %define release 1mdk %define Summary Emilia 3d Pinball Summary: %{Summary} Name: %{name} Version: %{version} Release: %{release} Source0: http://prdownloads.sourceforge.net/pinball/%{name}-%{version}.tar.bz2 Source1: %{name}-icons.tar.bz2 License: GPL Group: Games/Arcade URL: http://pinball.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: XFree86-devel MesaGLU-devel Mesa-common-devel SDL-devel >= 1.2 Buildrequires: png-devel SDL_image-devel SDL_mixer-devel oggvorbis-devel smpeg-devel Buildrequires: jpeg-devel tiff-devel %description The Emilia Pinball projects is an open source pinball simulator for linux and other unix systems. The current release is a stable and mature alpha. There is only one level to play with but it is however very addictive. %prep %setup -q %build #perl -pi -e "s/^\s*CFLAGS=\"-O2\".*/CFLAGS=\"$RPM_OPT_FLAGS\"/" configure #perl -pi -e "s/^\s*CXXFLAGS=\"-O2\".*/CXXFLAGS=\"$RPM_OPT_FLAGS\"/" configure ./configure --prefix=%{_prefix} \ --libdir=%{_libdir} \ --datadir=%{_gamesdatadir} \ --bindir=%{_gamesbindir} \ --with-pic \ --with-gnu-ld \ --build=%{_target_platform} # 0.2.0: parallel make is broken. make CXXFLAGS="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT %makeinstall_std EM_HIGHSCORE_DIR=/var/games/%{name} %{__install} -d $RPM_BUILD_ROOT%{_menudir} %{__cat} <<EOF > $RPM_BUILD_ROOT%{_menudir}/%{name} ?package(%{name}):command="%{_gamesbindir}/%{name}" \ icon=%{name}.png \ needs="x11" \ section="Amusement/Arcade" \ title="%{Summary}"\ longtitle="%{Summary}" EOF %{__install} -d ${RPM_BUILD_ROOT}{%{_miconsdir},%{_liconsdir}} %{__tar} -xOjf %{SOURCE1} %{name}-icons/%{name}-16x16.png > $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png %{__tar} -xOjf %{SOURCE1} %{name}-icons/%{name}-32x32.png > $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png %{__tar} -xOjf %{SOURCE1} %{name}-icons/%{name}-48x48.png > $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png # Remove development files untill someone wants them. rm -rf $RPM_BUILD_ROOT/%{_includedir}/%{name} \ $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.a rm -f $RPM_BUILD_ROOT/%{_gamesbindir}/%{name}-config %post %update_menus %postun %clean_menus %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %doc README AUTHORS ChangeLog NEWS %{_gamesbindir}/%{name} %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.so* %{_libdir}/%{name}/*.la %dir %{_gamesdatadir}/%{name} %{_gamesdatadir}/%{name}/* %dir /var/games/%{name} /var/games/%{name}/* %{_menudir}/%{name} %{_iconsdir}/%{name}.png %{_liconsdir}/%{name}.png %{_miconsdir}/%{name}.png %changelog * Sat Dec 20 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 0.3.1-1mdk - 0.3.1 - fix buildrequires (lib64..) * Sat Jun 14 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.3.0-2mdk - use %%{_gamesbindir} and %%{_gamesdatadir} - macroize - be sure to use $RPM_OPT_FLAGS - added some docs - added menu item - added icons - change summary macro to avoid conflicts with debug package - configure with --with-pic, --with-gnu-ld and --build=%%{_target_platform} - drop redundant requires, rpm will figure out library dependencies itself - change group, pinball is arcade not sports * Thu Jun 12 2003 Marcel Pol <mpol@gmx.net> 0.3.0-1mdk - 0.3.0 * Tue May 13 2003 Marcel Pol <mpol@gmx.net> 0.2.0a-1mdk - 0.2.0 * Tue May 06 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.1.2-2mdk - buildrequires * Wed Nov 6 2002 Arnaud Desmons <adesmons@mandrakesoft.com> 0.1.2-1mdk - new version * Mon Jul 08 2002 Arnaud Desmons <adesmons@mandrakesoft.com> 0.0.7-1mdk - new version * Tue May 28 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.0.6-1mdk - new version * Mon Apr 29 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.0.3-2mdk - rebuild for new alsa * Thu Apr 18 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.0.3-1mdk - first mdk package