File d2x-xl.spec of Package d2x-xl

#
# spec file for package d2x-xl
#
# 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 http://bugs.opensuse.org/
#


Name:           d2x-xl
Version:        1.18.74
Release:        0
Summary:        Descent2X XL
License:        GPL-2.0+
Group:          Amusements/Games/Action/Shoot
Url:            http://www.descent2.de/d2x.html
Source0:        http://www.descent2.de/files/d2x-xl-src-%{version}.7z
# PATCH-FIX-UPSTREAM d2x-xl-1.18.73-byteswap.patch sf#3604866 circumvent error with linux header
Patch0:         d2x-xl-1.18.73-byteswap.patch
# PATCH-FIX-UPSTREAM d2x-xl-1.18.73-overflow.patch sf#3604870 reddwarf@opensuse.org -- Fix buffer overflow
Patch1:         d2x-xl-1.18.73-overflow.patch
# PATCH-FIX-UPSTREAM fix-narrowing-conversion.patch -- https://sourceforge.net/p/d2x-xl/patches/30/
Patch2:         fix-narrowing-conversion.patch
# PATCH-FIX-UPSTREAM fix-cmake.patch -- https://sourceforge.net/p/d2x-xl/patches/31/
Patch3:         fix-cmake.patch
# PATCH-FIX-UPSTREAM fix-multiple-definitions.patch -- https://sourceforge.net/p/d2x-xl/patches/32/
Patch4:         fix-multiple-definitions.patch
# PATCH-FIX-UPSTREAM fix-array-underflow.patch -- https://sourceforge.net/p/d2x-xl/bugs/2888/
Patch5:         fix-array-underflow.patch
# PATCH-FIX-OPENSUSE do-not-use-DATE-and-TIME.patch -- Replace the usage of __DATE__ and __TIME__ macros
Patch6:         do-not-use-DATE-and-TIME.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libSDL_net-devel
BuildRequires:  p7zip-full
BuildRequires:  pkgconfig(SDL_image)
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(sdl)
BuildRequires:  pkgconfig(zlib)

%description
D2X is a port of Descent 2 to OpenGL. It is an open source project and has
received a lot of enhancements compared to Descent 2.

%prep
%setup -c -T
7z x %{SOURCE0}
7z x -y d2x-xl-makefiles.7z
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install
mkdir -p %{buildroot}%{_datadir}/d2x-xl/

%files
%defattr(-,root,root)
%doc COPYING LICENSE
%{_bindir}/d2x-xl
%dir %{_datadir}/d2x-xl/

%changelog
openSUSE Build Service is sponsored by