File sar2.spec of Package sar2

# spec file for package sar2
# Copyright (c) 2017 SUSE LINUX 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

Name:           sar2
Version:        2.3.2
Release:        0
Summary:        Rescue Helicopter Simulator
License:        GPL-2.0
Group:          Amusements/Games/3D/Simulation
Patch2:         appdata.patch
BuildRequires:  Mesa-devel
BuildRequires:  fdupes
BuildRequires:  freealut-devel
BuildRequires:  gcc-c++
BuildRequires:  libSDL-devel
BuildRequires:  libvorbis-devel
BuildRequires:  openal-soft-devel
BuildRequires:  scons
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-libICE-devel
BuildRequires:  xorg-x11-libSM-devel
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  xorg-x11-libXext-devel
BuildRequires:  xorg-x11-libXmu-devel
BuildRequires:  xorg-x11-libXpm-devel
Requires:       %{name}-data = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Search and Rescue II is a rescue helicopter simulator for Linux.
It features several missions where the player pilots a
helicopter in order to rescue people in distress. There are
several scenarios and helicopter models.

SaR II has a strong focus on realistic physics and low graphics requirements
and it is a fork of the game "Search and Rescue"

Among the improvements of SaR II are:
* OpenAL sound effects
* Smoother graphics
* Full SDL Joystick support
* Full playable music

%package data
Summary:        Data files for sar2
Group:          Amusements/Games/3D/Simulation
Requires:       %{name} = %{version}
BuildArch:      noarch

%description data
Data files for Search and Rescue II

%setup -q
%patch1 -p1 -b .optflags
%patch2 -p1

scons --optflags="%{optflags} -DHAVE_LIBXPM"

mkdir -p %{buildroot}%{_datadir}/%{name}
cp -ar data/* %{buildroot}%{_datadir}/%{name}/

mkdir -p %{buildroot}%{_mandir}/man6
cp -a man/* %{buildroot}%{_mandir}/man6

mkdir -p %{buildroot}%{_bindir}
cp -a bin/%{name} %{buildroot}%{_bindir}

install -D -m 0644 extra/sar2.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}

install -D -m 0644 extra/sar2.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm

install -D -m 0644 extra/sar2.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml

%fdupes %{buildroot}%{_datadir}



%doc %{_mandir}/man6/%{name}.6*

%files data

openSUSE Build Service is sponsored by