File orbital.spec of Package orbital

#
# spec file for package orbital (Version 1.01)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           orbital
BuildRequires:  freeglut-devel libdrm-devel xorg-x11
License:        GNU General Public License (GPL)
Group:          Amusements/Games/3D/Simulation
Autoreqprov:    on
Version:        1.01
Release:        701
Summary:        Space Combat Simulator
URL:            http://www.head-crash.com/orbit
Source:         orbit-%{version}.tar.bz2
Patch1:         orbit-%{version}-path.patch
Patch2:         orbit-freeglut.patch
Patch3:         orbit-flags.patch
Patch4:         orbit-flags64.patch
Patch5:         orbit-1.01-strict_aliasing.patch
Patch6:         orbit-1.01-non_void.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Orbital is like the Wing Commander games, the X-Wing or TIE fighter
games,	Descent Freespace, or any of many other such games, you're
already familiar with the basic idea: You must fly around space and
destroy enemies.



Authors:
--------
    Steve Belczyk <orbit@genesis.nred.ma.us>

%prep
%setup -n orbit-%{version}
# remove CRLF
cd src
FILES=`ls *.c *.h`
for FILE in $FILES
do
tr -d "\r" < $FILE > file.new
mv file.new $FILE
done  
cd ..
%patch1 
%patch2
%if "%_lib" == "lib64"
%patch4
%else
%patch3
%endif
%patch5
%patch6
# fix permision
chmod 644  README.TXT license.txt
chmod 644  doc/*.gif 
chmod 644  doc/*.html

%build
cd src
#    Exporting these have no effect, forced in flags.patch
#
#export CFLAGS="$RPM_OPT_FLAGS"
#export XLIBDIR="-L/usr/%{_lib}" GLLIBS="-lglut -lGLU -lGL -lm"
#
make %{?jobs:-j%jobs}

%install
install -m 755 -d $RPM_BUILD_ROOT/usr/games
install -m 755 orbit $RPM_BUILD_ROOT/usr/games/orbital
install -m 755 -d $RPM_BUILD_ROOT/usr/share/games/orbital
cp -vr maps/ missions/ models/ sounds/ \
       $RPM_BUILD_ROOT/usr/share/games/orbital/

%files
%defattr(-,root,root)
%doc README.TXT license.txt doc/
/usr/games/orbital
/usr/share/games/orbital/

%changelog -n orbital
* Thu Jan 18 2007 - lmichnovic@suse.cz
- now using RPM_OPT_FLAGS (flags*.patch)
- fixed strict aliasing (strict_aliasing.patch)
- fixed non void functions (non_void.patch)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Sat Nov 05 2005 - sndirsch@suse.de
- fixed "freeglut  ERROR:  Function <glutBitmapLength> called
  without first calling 'glutInit'."
* Sat Nov 05 2005 - sndirsch@suse.de
- fixed build with external built Mesa (libMesaGL/libMesaGLU no
  longer exist)
* Sun Jan 11 2004 - adrian@suse.de
- add %%defattr
* Mon Oct 13 2003 - ro@suse.de
- remove explicit requires for mesa
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Fri Apr 05 2002 - pmladek@suse.cz
- used macro %%{_lib} to fix for lib64
* Thu Nov 08 2001 - ro@suse.de
- use mesa-devel-packages in neededforbuild
* Wed Aug 08 2001 - dan@suse.cz
- use bzip instead of gzip
* Fri Jun 22 2001 - pblaha@suse.cz
- create this package version 1.0.1
- fix path to data and save files into $HOME/~.orbital/
openSUSE Build Service is sponsored by