[sar2/f15] initial import

Tom Callaway spot at fedoraproject.org
Mon Aug 8 17:09:32 UTC 2011


commit 978d728624229ae0da492876ba0c346e03d8edb9
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Mon Aug 8 13:09:21 2011 -0400

    initial import

 sar2-2.3.0-desktop-file-cleanup.patch |   14 +++++++
 sar2-2.3.0-openal-link-fix.patch      |   12 ++++++
 sar2-2.3.0-optflags.patch             |   27 +++++++++++++
 sar2-2.3.0-sane-datadir.patch         |   12 ++++++
 sar2.spec                             |   67 +++++++++++++++++++++++++++++++++
 sources                               |    1 +
 6 files changed, 133 insertions(+), 0 deletions(-)
---
diff --git a/sar2-2.3.0-desktop-file-cleanup.patch b/sar2-2.3.0-desktop-file-cleanup.patch
new file mode 100644
index 0000000..626a367
--- /dev/null
+++ b/sar2-2.3.0-desktop-file-cleanup.patch
@@ -0,0 +1,14 @@
+diff -up sar2-2.3.0/extra/sar2.desktop.cleanup sar2-2.3.0/extra/sar2.desktop
+--- sar2-2.3.0/extra/sar2.desktop.cleanup	2011-06-14 16:50:10.155616369 -0400
++++ sar2-2.3.0/extra/sar2.desktop	2011-06-14 16:50:47.536134201 -0400
+@@ -2,8 +2,7 @@
+ Encoding=UTF-8
+ Name=Search And Rescue II
+ Exec=sar2
+-Terminal=False
++Terminal=false
+ Type=Application
+-Categories=Game
+-Value=1.0
++Categories=Game;
+ Icon=sar2
diff --git a/sar2-2.3.0-openal-link-fix.patch b/sar2-2.3.0-openal-link-fix.patch
new file mode 100644
index 0000000..3c5802e
--- /dev/null
+++ b/sar2-2.3.0-openal-link-fix.patch
@@ -0,0 +1,12 @@
+diff -up sar2-2.3.0/src/SConscript.openal sar2-2.3.0/src/SConscript
+--- sar2-2.3.0/src/SConscript.openal	2011-06-14 16:38:29.153654898 -0400
++++ sar2-2.3.0/src/SConscript	2011-06-14 16:38:35.012579387 -0400
+@@ -21,7 +21,7 @@ env.Append( CPPFLAGS=" -DHAVE_LIBXPM" )
+ #'-Wno-write-strings', '-DHAVE_LIBXPM'])
+ 
+ env.Append(LIBS = ['m', 'SDL', 'SM', 'ICE',
+-'X11','Xext','Xmu', 'Xpm', 'GL', 'GLU', 'pthread', 'alut', 'vorbisfile'])
++'X11','Xext','Xmu', 'Xpm', 'GL', 'GLU', 'pthread', 'alut', 'openal', 'vorbisfile'])
+ 
+ 
+ sources = Split("""
diff --git a/sar2-2.3.0-optflags.patch b/sar2-2.3.0-optflags.patch
new file mode 100644
index 0000000..3545adb
--- /dev/null
+++ b/sar2-2.3.0-optflags.patch
@@ -0,0 +1,27 @@
+diff -up sar2-2.3.0/src/SConscript.optflags sar2-2.3.0/src/SConscript
+--- sar2-2.3.0/src/SConscript.optflags	2011-06-14 16:24:44.944270508 -0400
++++ sar2-2.3.0/src/SConscript	2011-06-14 16:32:37.478186185 -0400
+@@ -1,8 +1,20 @@
+ env = Environment()
+ 
+-env.Append(CPPFLAGS = ['-Wall', '-O6', '-funroll-loops', '-fomit-frame-pointer',
+-'-ffast-math', '-finline-functions', '-fexpensive-optimizations',
+-'-Wno-write-strings', '-DHAVE_LIBXPM'])
++AddOption( "--optflags",
++           dest="optflags",
++           type="string",
++           nargs=1,
++           action="store",
++           help="set custom optflags")
++
++optflags = GetOption("optflags")
++
++if optflags:
++    env.Append( CPPFLAGS = optflags )
++else:
++    env.Append( CPPFLAGS ="-Wall -O6 -funroll-loops -fomit-frame-pointer -ffast-math -finline-functions -fexpensive-optimizations -Wno-write-strings")
++
++env.Append( CPPFLAGS=" -DHAVE_LIBXPM" )
+ 
+ # speed up compilation and enable debugging
+ #env.Append(CPPFLAGS = ['-g', '-Wall', '-O0', '-finline-functions', 
diff --git a/sar2-2.3.0-sane-datadir.patch b/sar2-2.3.0-sane-datadir.patch
new file mode 100644
index 0000000..a7c4923
--- /dev/null
+++ b/sar2-2.3.0-sane-datadir.patch
@@ -0,0 +1,12 @@
+diff -up sar2-2.3.0/src/config.h.BAD sar2-2.3.0/src/config.h
+--- sar2-2.3.0/src/config.h.BAD	2011-06-14 16:10:55.296771900 -0400
++++ sar2-2.3.0/src/config.h	2011-06-14 16:11:10.710576745 -0400
+@@ -509,7 +509,7 @@ to the fullest extent of the law."
+ #define SAR_DEF_LOCAL_DATA_DIR  ".config/sar2"
+ 
+ /* Game data dir */
+-#define SAR_DEF_GLOBAL_DATA_DIR "/usr/share/games/sar2"
++#define SAR_DEF_GLOBAL_DATA_DIR "/usr/share/sar2"
+ 
+ /* Subdirs, one of each in the local and global game dirs */
+ #define SAR_DEF_AIRCRAFTS_DIR		"aircrafts"
diff --git a/sar2.spec b/sar2.spec
new file mode 100644
index 0000000..a80212d
--- /dev/null
+++ b/sar2.spec
@@ -0,0 +1,67 @@
+Name:		sar2
+Version:	2.3.0
+Release:	1%{?dist}
+Summary:	An open source helicopter simulator
+Group:		Amusements/Games
+# Code is GPLv2+
+# Content is either GPLv2+ or Public Domain
+License:	GPLv2+
+URL:		http://sar2.sourceforge.net/
+Source0:	http://downloads.sourceforge.net/project/%{name}/%{name}-%{version}.tar.bz2
+Patch0:		sar2-2.3.0-sane-datadir.patch
+Patch1:		sar2-2.3.0-optflags.patch
+Patch2:		sar2-2.3.0-openal-link-fix.patch
+Patch3:		sar2-2.3.0-desktop-file-cleanup.patch
+BuildRequires:	scons, desktop-file-utils
+BuildRequires:	libX11-devel, libSM-devel, libXi-devel, libXmu-devel
+BuildRequires:	SDL-devel, SDL_image-devel, openal-soft-devel, freealut-devel
+BuildRequires:	mesa-libGLU-devel, mesa-libGL-devel, libICE-devel
+BuildRequires:	libXpm-devel, libvorbis-devel, libXext-devel
+
+%description
+Search and Rescue II is a rescue helicopter simulator for Linux. It features 
+several missions in which the player pilots a helicopter in order to rescue 
+people in distress. There are several scenarios and helicopter models.
+
+Search and Rescue II has a strong focus on realistic physics and low graphics 
+requirements. It is a fork of the game "Search and Rescue" 
+(http://searchandrescue.sf.net), originally developed by Wolfpack 
+Entertainment.
+
+%prep
+%setup -q
+%patch0 -p1 -b .datadir
+%patch1 -p1 -b .optflags
+%patch2 -p1 -b .openal
+%patch3 -p1 -b .cleanup
+
+%build
+scons --optflags="%{optflags}"
+
+%install
+# install.sh is pretty dumb.
+mkdir -p %{buildroot}%{_datadir}/%{name}
+mkdir -p %{buildroot}%{_mandir}/man6
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/
+mkdir -p %{buildroot}%{_datadir}/pixmaps/
+
+cp -ar data/* %{buildroot}%{_datadir}/%{name}/
+cp -a man/* %{buildroot}%{_mandir}/man6
+cp -a bin/%{name} %{buildroot}%{_bindir}
+cp -a extra/%{name}.xpm %{buildroot}%{_datadir}/icons/hicolor/48x48/
+cp -a src/icons/SearchAndRescue.xpm %{buildroot}%{_datadir}/pixmaps/
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications extra/%{name}.desktop
+
+%files
+%doc AUTHORS CHANGELOG HACKING LICENSE README
+%{_bindir}/%{name}
+%{_datadir}/%{name}/
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/48x48/%{name}.xpm
+%{_datadir}/pixmaps/SearchAndRescue.xpm 
+%{_mandir}/man6/*
+
+%changelog
+* Tue Jun 14 2011 Tom Callaway <spot at fedoraproject.org> - 2.3.0-1
+- initial package
diff --git a/sources b/sources
index e69de29..201059d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f91efe02165f371bd2ba8cb452a29677  sar2-2.3.0.tar.bz2


More information about the scm-commits mailing list