LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File xmoto.spec of Package xmoto (Project games)

# spec file for package xmoto
# 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:           xmoto
Version:        0.5.10
Release:        0
Summary:        2D motocross platform game
License:        GPL-2.0+
Group:          Amusements/Games/Action/Other
Url:            http://xmoto.tuxfamily.org/
# recompressed http://download.tuxfamily.org/%%{name}/%%{name}/%%{version}/%%{name}-%%{version}-src.tar.gz
Source0:        %{name}-%{version}-src.tar.bz2
# PATCH-FIX-UPSTREAM xmoto-0.5.5-basedir.patch adam@mizerski.pl -- Fix implicit declaration of function 'mkdir'
Patch0:         %{name}-0.5.5-basedir.patch
# PATCH-FIX-UPSTREAM xmoto-0.5.10-gcc47.patch
Patch1:         %{name}-0.5.10-gcc47.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libSDL-devel
BuildRequires:  libSDL_mixer-devel
BuildRequires:  libSDL_net-devel
BuildRequires:  libSDL_ttf-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libode-devel
BuildRequires:  libxml2-devel
%if 0%{?suse_version} >= 1130
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(lua)
BuildRequires:  pkgconfig(sqlite3)
%if 0%{?suse_version} >= 1140
BuildRequires:  pkgconfig(zlib)
BuildRequires:  zlib-devel
%if 0%{?suse_version} <= 1120
BuildRequires:  Mesa-devel
BuildRequires:  libbz2-devel
BuildRequires:  libcurl-devel
BuildRequires:  libpng-devel
BuildRequires:  lua-devel
BuildRequires:  sqlite-devel
BuildRequires:  zlib-devel
BuildRequires:  update-desktop-files

X-Moto is a challenging 2D motocross platform game, where physics play
an all important role in the gameplay. You need to control your bike to
its limit, if you want to have a chance finishing the more difficult of
the challenges.  First you'll try just to complete the levels, while
later you'll compete with yourself and others, racing against the

%setup -q
%patch0 -p1
%patch1 -p1
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/states/StateOptions.cpp src/GameInit.cpp
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%T')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/states/StateOptions.cpp src/GameInit.cpp

CXXFLAGS="%{optflags} -fno-strict-aliasing" \
%configure --with-asian-ttf-file=%{_datadir}/fonts/truetype/bkai00mp.ttf --with-internal-xdg=1
make %{?_smp_mflags}

make install DESTDIR=%{buildroot}
%fdupes %{buildroot}%{_datadir}/locale
install -p -D -m 644 extra/%{name}.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
%suse_update_desktop_file -i %{name}
%find_lang %{name}

%files -f %{name}.lang
%defattr(-, root, root)
%if 0%{?suse_version} <= 1130
%dir %{_datadir}/locale/ca_AD
%dir %{_datadir}/locale/ca_AD/LC_MESSAGES
%dir %{_datadir}/locale/ca_ES
%dir %{_datadir}/locale/ca_ES/LC_MESSAGES
%dir %{_datadir}/locale/ca_FR
%dir %{_datadir}/locale/ca_FR/LC_MESSAGES
%dir %{_datadir}/locale/ca_IT
%dir %{_datadir}/locale/ca_IT/LC_MESSAGES
%dir %{_datadir}/locale/da_DK
%dir %{_datadir}/locale/da_DK/LC_MESSAGES
%dir %{_datadir}/locale/hu_HU
%dir %{_datadir}/locale/hu_HU/LC_MESSAGES
%dir %{_datadir}/locale/lt_LT
%dir %{_datadir}/locale/lt_LT/LC_MESSAGES
%dir %{_datadir}/locale/lv_LV
%dir %{_datadir}/locale/lv_LV/LC_MESSAGES
%dir %{_datadir}/locale/nl_NL
%dir %{_datadir}/locale/nl_NL/LC_MESSAGES
%dir %{_datadir}/locale/sk_SK
%dir %{_datadir}/locale/sk_SK/LC_MESSAGES
%dir %{_datadir}/locale/sv_SE
%dir %{_datadir}/locale/sv_SE/LC_MESSAGES
%if 0%{?suse_version} == 1120
%dir %{_datadir}/locale/gl_ES
%dir %{_datadir}/locale/gl_ES/LC_MESSAGES