File orbital.spec of Package orbital

#
# spec file for package orbital
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           orbital
Version:        1.01
Release:        0
Summary:        Space Combat Simulator
License:        GPL-2.0+
Group:          Amusements/Games/3D/Simulation
Url:            http://www.head-crash.com/orbit
Source:         orbit-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         orbit-%{version}-path.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2:         orbit-freeglut.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch3:         orbit-flags.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch4:         orbit-flags64.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch5:         orbit-1.01-strict_aliasing.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch6:         orbit-1.01-non_void.patch
# PATCH-FIX-UPSTREAM  orbit-1.01-include.patch
Patch7:         orbit-1.01-include.patch
BuildRequires:  dos2unix
BuildRequires:  freeglut-devel
BuildRequires:  libXi-devel
BuildRequires:  libXmu-devel
BuildRequires:  libXt-devel
BuildRequires:  libdrm-devel
BuildRequires:  xorg-x11
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.

%prep
%setup -n orbit-%{version}
# remove CRLF
find src -type f -exec dos2unix "{}" "+" -exec chmod 0644 "{}" "+"
%patch1
%patch2
%if "%{_lib}" == "lib64"
%patch4
%else
%patch3
%endif
%patch5
%patch6
%patch7 -p1
# fix permision
chmod 644  README.TXT license.txt
chmod 644  doc/*.gif
chmod 644  doc/*.html
chmod 644  maps/*.ppm
find missions -type f -exec dos2unix \{\} \; -exec chmod 0644 \{\} \;
find models -type f -exec dos2unix \{\} \; -exec chmod 0644 \{\} \;

%build
cd src
make %{?_smp_mflags}

%install
install -D -m 755 orbit %{buildroot}%{_bindir}/orbital
install -m 755 -d %{buildroot}%{_datadir}/orbital
cp -vr maps/ missions/ models/ sounds/ \
       %{buildroot}%{_datadir}/orbital/

%files
%defattr(-,root,root)
%doc README.TXT doc/
%license license.txt
%{_bindir}/orbital
%{_datadir}/orbital/

%changelog
openSUSE Build Service is sponsored by