File glestae.spec of Package glestae
#
# spec file for package glestae
#
# Copyright 2011 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: glestae
Version: to_be_filled_by_service
Release: 0
License: GPLv2+
Group: Amusements/Games/Strategy/Real Time
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
BuildRequires: libvorbis-devel
BuildRequires: lua-devel
BuildRequires: openal-soft-devel
BuildRequires: glew-devel
BuildRequires: freetype2-devel
BuildRequires: xorg-x11-Mesa-devel
%if 0%{?suse_version} >= 1140
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
BuildRequires: wxWidgets-devel
%else
BuildRequires: wxGTK-devel
%endif
%if %{defined suse_version}
BuildRequires: libSDL-devel
BuildRequires: libphysfs-devel
BuildRequires: update-desktop-files
%endif
%if %{defined fedora}
BuildRequires: SDL-devel
BuildRequires: physfs-devel
BuildRequires: desktop-file-utils
%endif
Summary: Free 3D Real-Time Customizable Strategy Game
Url: http://sourceforge.net/apps/trac/glestae/
Source0: %{name}-src-%{version}.tar.gz
Requires: glestae-data = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Glest Advanced Engine is a community driven project which extends and improves
on Glest. It aims to provide features and tools that help people develop higher
quality 3D real-time strategy games for all major platforms.
%prep
%setup -q -n %{name}-src-%{version}
%build
export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
mkdir build
cd build
cmake -DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \
-DGAE_PKG_ONLY_BIN=ON \
-DCMAKE_BUILD_TYPE=Release ..
make %{?_smp_mflags} VERBOSE=1
%install
cd build
%make_install
%if %{defined suse_version}
%suse_update_desktop_file glestadv
%suse_update_desktop_file gae_mapeditor
%suse_update_desktop_file gae_g3dviewer
%endif
%if %{defined fedora}
desktop-file-validate %{buildroot}/%{_datadir}/applications/glestadv.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/gae_mapeditor.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/gae_g3dviewer.desktop
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-, root, root)
%doc docs/AUTHORS docs/ChangeLog docs/COPYING docs/COPYRIGHTS docs/license.txt docs/README
%{_bindir}/glestadv
%{_bindir}/gae_mapeditor
%{_bindir}/gae_g3dviewer
%{_datadir}/pixmaps/*.png
%{_datadir}/applications/*.desktop
%changelog