Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 1712a219f370ae6549f0628caca8e275 > files > 8

airstrike-1.0-1.pre6a.6mdv2010.0.src.rpm

%define name	airstrike
%define version 1.0
%define	pre	pre6a
%define release 1.%{pre}.6
%define	Summary	Incredibly addictive 2D dogfight game

Summary:	%{Summary}
Name:		%{name}
Version:	%{version}
Release:	%mkrel %{release}
License:	GPL
Group:		Games/Arcade
Source0:	%{name}-%{pre}-src.tar.gz
Source11:	%{name}-16x16.png
Source12:	%{name}-32x32.png
Source13:	%{name}-48x48.png
Patch0:		airstrike-pre6a-config.patch.bz2
Patch1:		airstrike-pre6a-optflags.patch.bz2
Patch2:		airstrike-pre6a-fix-path-to-data.patch.bz2
URL:		http://icculus.org/airstrike/
BuildRequires:	SDL-devel SDL_mixer-devel SDL_image-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
Airstrike is a 0-2 players 2d dogfight game in the tradition of the 
Intellivision and Amiga games 'Biplanes' and 'BIP'. It features a robust 
physics engine and several other extensions of the original games, 
such as povray made graphics and incredible gameplay.

%prep
%setup -q -n %{name}-%{pre}-src
%patch0 -p1 -b .config
%patch1 -p1 -b .optflags
#%patch2 -p1 -b .path

%build
%make OPTFLAGS="$RPM_OPT_FLAGS" airstrike-sound

%install
rm -rf %{buildroot}
install -m755 airstrike -D %{buildroot}%{_gamesbindir}/airstrike.bin

# Launch script
cat <<EOF > %{buildroot}%{_gamesbindir}/airstrike
#!/bin/sh
if [ ! -e \$HOME/.airstrikerc ]; then
	cp %{_gamesdatadir}/%{name}/airstrikerc \$HOME/.airstrikerc
fi
cd %{_gamesdatadir}/%{name}
airstrike.bin \$@
EOF
chmod 755 %{buildroot}%{_gamesbindir}/airstrike

install -m644 airstrikerc -D %{buildroot}%{_gamesdatadir}/%{name}/airstrikerc
cp -r data  %{buildroot}%{_gamesdatadir}/%{name}

install -m644 doc/airstrike.6 -D %{buildroot}%{_mandir}/man6/airstrike.6 

#Menu items

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF
[Desktop Entry]
Name=AirStrike
Comment=%{Summary}
Exec=%{_gamesbindir}/%{name}
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=true
Categories=X-MandrivaLinux-MoreApplications-Games-Arcade;Game;ArcadeGame;
EOF

install -m644 %{SOURCE11} -D %{buildroot}%{_miconsdir}/%{name}.png
install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/%{name}.png
install -m644 %{SOURCE13} -D %{buildroot}%{_liconsdir}/%{name}.png

%if %mdkversion < 200900
%post
%update_menus
%endif

%if %mdkversion < 200900
%postun
%clean_menus
%endif

%clean
rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%doc ChangeLog README doc
%{_gamesbindir}/*
%dir %{_gamesdatadir}/%{name}
%{_gamesdatadir}/%{name}/*
%{_mandir}/man6/airstrike.6*
%{_datadir}/applications/mandriva-%{name}.desktop
%{_miconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png



%changelog
* Tue Sep 01 2009 Thierry Vignaud <tvignaud@mandriva.com> 1.0-1.pre6a.6mdv2010.0
+ Revision: 423987
- rebuild
- rebuild
- rebuild

* Thu Jun 12 2008 Pixel <pixel@mandriva.com> 1.0-1.pre6a.3mdv2009.0
+ Revision: 218437
- rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

  + Thierry Vignaud <tvignaud@mandriva.com>
    - drop old menu

* Thu Dec 20 2007 Olivier Blin <oblin@mandriva.com> 1.0-1.pre6a.3mdv2008.1
+ Revision: 135819
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request
    - import airstrike


* Mon Sep 04 2006 Nicolas Lécureuil <neoclust@mandriva.org> 1.0-1.pre6a.3mdv2007.0
- XDG

* Wed Jun 28 2006 Lenny Cartier <lenny@mandriva.com> 1.0-1.pre6a.2mdv2007.0
- rebuild

* Wed Aug 31 2005 Per Øyvind Karlsen <pkarlsen@mandriva.com> 1.0-1.pre6a.1mdk
- pre6a
- regenerate and apply config patch (P0)
- be sure to use optimizations again (regenerate P1 and actually apply it)
- make airstrike look in the correct path for data (P2, disabled, causes problem
  some weird reason..)
- compile with sound support
- cleanups
- %%mkrel

* Wed Sep 01 2004 Robert Vojta <robert.vojta@mandrake.org> 1.0-0.pre6.3mdk
- More applications -> More Applications (#11006)

* Wed Apr 07 2004 Michael Scherer <misc@mandrake.org> 1.0-0.pre6.2mdk 
- rebuild
- update menu
- update BuildRequires

* Thu Feb 27 2003 Antoine Ginies <aginies@mandrakesoft.com> 1.0-0.pre6.1mdk
- rebuild snapshot 18 feb 2003

* Tue Nov 12 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.0-0.pre4.3mdk
- from Per Øyvind Karlsen <peroyvind@delonic.no> :
	- Put stuff in corrects places
	- Added menuitem
	- Added icons
	- Cleanups
	- Optimize flags(Patch #1)
	- Enable sound

* Thu Oct 24 2002 Amaury Amblard-Ladurantie <amaury@mandrakesoft.com> 1.0-0.pre4.2mdk
- added default config patch

* Tue Oct 22 2002 Amaury Amblard-Ladurantie <amaury@mandrakesoft.com> 1.0-0.pre4.1mdk
- first release