File gzdoom.spec of Package gzdoom

# spec file for package gzdoom
# Copyright (c) 2016 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

Name:           gzdoom
Version:        3.1.0
Release:        1.1
Summary:        Highly Advanced Doom source port
License:        BSD-3-Clause
Group:          Amusements/Games/3D/Shoot
Source1:        gzdoom.desktop
BuildRequires:  gcc-c++
BuildRequires:  zlib-devel
BuildRequires:  libSDL2-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libbz2-devel
BuildRequires:  gtk3-devel
BuildRequires:  cmake
BuildRequires:  fluidsynth-devel
BuildRequires:  libgme-devel
BuildRequires:  openal-soft-devel
BuildRequires:  timidity
BuildRequires:  glibc-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  ImageMagick
BuildRequires:  pkgconfig(gl)
Recommends:     freedoom
Recommends:     timidity
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

GZDoom is one of the most advanced and popular Doom ports, supporting Boom
editing extensions, plus all the extensions made by the HeXen engine, as well as
adding a multitude of new features not found in the original Doom. In addition,
it supports Heretic, Hexen, and Strife.

%setup -q -n %{name}-g%{version}
sed -i s,"<unknown version>","%{version}",g tools/updaterevision/updaterevision.c
sed -i s,"__DATE__","\"\"",g src/posix/sdl/i_main.cpp

mkdir build
pushd build
# the cmake macro contains parameters which will break the linker
cmake -DGME_INCLUDE_DIR="%{_includedir}/gme" -DFORCE_INTERNAL_GME=OFF \
      -DINSTALL_PK3_PATH="%{_datadir}/%{name}" \
      -DINSTALL_DOCS_PATH="%{_docdir}/%{name}" \
      -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
      -DCMAKE_BUILD_TYPE=Release ..
make %{?_smp_mflags}


pushd build
make install DESTDIR="%{buildroot}"

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
convert src/posix/zdoom.xpm gzdoom.png
install -m644 gzdoom.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gzdoom.png

%suse_update_desktop_file -i %name




* Sun Jul 10 2016
- initial packaging of version 2.1.1 (coincides with ZDoom 2.8.1)