File stuntrally.spec of Package stuntrally
#
# spec file for package stuntrally
#
# Copyright (c) 2012 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: stuntrally
%define gversion 775966
Version: 1.6
Release: 0
Summary: Rally game with stunt elements
License: GPL-3.0
Group: Amusements/Games/Action/Race
Url: http://code.google.com/p/vdrift-ogre/
Source0: stuntrally-stuntrally-%{version}-91-gb%{gversion}.tar.gz
BuildRequires: MyGUI-devel libenet-devel
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libOIS-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(OGRE)
BuildRequires: pkgconfig(OGRE-Paging)
BuildRequires: pkgconfig(OGRE-Property)
BuildRequires: pkgconfig(OGRE-RTShaderSystem)
BuildRequires: pkgconfig(OGRE-Terrain)
Requires: %{name}-data = %{version}
Recommends: %( echo libOgreMain-$(pkg-config --modversion OGRE)-plugin-Cg | sed 's/\./_/g' )
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Rally racing game with stunt elements.
%package data
Summary: Data files for Stunt Rally
Group: Amusements/Games/Action/Race
Requires: %{name} = %{version}
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description data
Data files for Stunt Rally.
%prep
%setup -q -n stuntrally-stuntrally-b%{gversion}
%build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSHARE_INSTALL=share/stuntrally -DCMAKE_BUILD_TYPE=Release ..
make %{?_smp_mflags}
%install
pushd build
%make_install
popd
sed -i 's|stuntrally.png|stuntrally|g' dist/stuntrally.desktop
sed -i 's|stuntrally.png|stuntrally|g' dist/sr-editor.desktop
%suse_update_desktop_file stuntrally Game ArcadeGame
%suse_update_desktop_file sr-editor Game ArcadeGame
# these two datafiles are noarch but contain arch specific stuff
# that's why they have to be in the main package
#sed -i 's|/usr/lib|%{_libdir}|g' %{buildroot}%{_datadir}/stuntrally/config/plugins_nix.cfg
#sed -i 's|/usr/lib|%{_libdir}|g' %{buildroot}%{_datadir}/stuntrally/config/plugins_nix_d.cfg
install -d %{buildroot}%{_datadir}/stuntrally/tracks
#cp -prf data/tracks/* %{buildroot}%{_datadir}/stuntrally/tracks
%fdupes %{buildroot}%{_datadir}
%files
%defattr(-,root,root,-)
%{_bindir}/sr-editor
%{_bindir}/stuntrally
%{_datadir}/applications/sr-editor.desktop
%{_datadir}/applications/stuntrally.desktop
%{_datadir}/icons/hicolor/64x64/apps/stuntrally.png
%dir %{_datadir}/stuntrally/
%{_datadir}/stuntrally/config/
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%files data
%defattr(-,root,root,-)
%{_datadir}/stuntrally/
%exclude %{_datadir}/stuntrally/config/
%changelog