File boson.spec of Package boson

#
# spec file for package boson (Version 0.13)
#
# 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:           boson
BuildRequires:  SDL-devel cmake kdegames3 kdemultimedia3-devel lib3ds python-devel fdupes
%if %suse_version < 1230
BuildRequires:  openal-devel 
%else
BuildRequires:  openal-soft-devel 
%endif
%if %{?opensuse_bs:1}0
%else
BuildRequires:  mad-devel
%endif
URL:            http://boson.eu.org
License:        GNU General Public License (GPL)
Group:          Amusements/Games/Strategy/Real Time
Summary:        OpenGL Real-Time Strategy Game like Command&Conquer(tm)
Version:        0.13
Release:        31
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-all-%{version}.tar.bz2
Patch0:         %name.diff
Patch1: boson-0.13-linux-headers.patch
#Patch2: boson-0.13-cmake.patch
Patch3: 090_all_KDE3Macros.cmake.patch
Patch4: 050_all_gcc43.patch
Patch5: boson-gcc47.patch

%description
Boson is an OpenGL real-time strategy game with the feeling of
Command&Conquer(tm) or StarCraft(tm) and OpenGL support.



Authors:
--------
    --- Code ---
    Initial design and implementation                               Thomas Capricelli <orzel@kde.org>
    Core developer and maintainer                                   Andreas Beckermann <b_mann@gmx.de>
    Core developer                                                         Rivo Laks <rivolaks@hot.ee>
    Release coordinator                                                  Thomas Capricelli <orzel@kde.org>
    
    --- Multimedia ---
    Graphics of the main themes (earth, humans)             Benjamin Adler <BenniAdler@bigfoot.de>
    Music (progressive, jungle themes) and sounds           Nils Trzebin (http://www.rebellion-scs.de/boson/)
    Music ('soft' theme)                                                   Ludovic Grossard (http://perso.libertysurf.fr/grossard/boson/)
    Sound effects                                                           Timo Huebel <t.h@gmxpro.de>
    
    --- Other ---
    Webmaster, initial homepage, mailing-list maintainer    Thomas Capricelli <orzel@kde.org>
    Homepage design                                                      Rivo Laks <rivolaks@hot.ee> and Benjamin Adler <BenniAdler@bigfoot.de>
    Boson Handbook                                                       Felix Seeger <felix.seeger@gmx.de>

%prep
%setup -q -n %name-all-%version
%patch0 -b .orig
%patch1
#%patch2
%patch3 -p1
%patch4 -p1
%patch5 -p1
#sed -i 1i\ '#include <cmath>' code/ufo/include/ufo/util/urectangle.hpp

%build
export CXXFLAGS="$CXXFLAGS -Wl,--add-needed"
rm -f cmake/modules/boson/KDE3Macros.cmake
mkdir obj
cd obj
export QTDIR=/usr/lib/qt3
cmake -DCMAKE_INSTALL_PREFIX=/opt/kde3 .. -Wno-dev
make %{?jobs:-j %jobs}

%install
cd obj
make DESTDIR=$RPM_BUILD_ROOT install
#%suse_update_desktop_file -G "C&C Clone" boson-boson Game StrategyGame
%suse_update_desktop_file -u boson-boinfo Game StrategyGame
%suse_update_desktop_file -u boson-bounit Game StrategyGame
%fdupes $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/opt/kde3/bin/*
/opt/kde3/share/applications/kde/boson*.desktop
/opt/kde3/share/apps/boson
/opt/kde3/share/config/bo*
/opt/kde3/share/icons/hicolor/*/apps/boson.png
/opt/kde3/share/icons/hicolor/*/apps/boeditor.png
/opt/kde3/share/icons/hicolor/22x22/actions/bo_edit_height.png
/opt/kde3/%_lib/kde3/plugins

%changelog 
openSUSE Build Service is sponsored by