LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gzdoom.spec of Package gzdoom (Project home:nikgul)

#
# 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 http://bugs.opensuse.org/
#


Name:           gzdoom
Version:        3.1.0
Release:        1.1
Summary:        Highly Advanced Doom source port
License:        BSD-3-Clause
Group:          Amusements/Games/3D/Shoot
Url:            https://zdoom.org/
Source0:        https://github.com/coelckers/gzdoom/archive/g%{version}.tar.gz
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

%description
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.

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

%build
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}
popd

%install


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

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

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_docdir}/%{name}
%{_datadir}/icons/hicolor/48x48/apps/gzdoom.png
%{_datadir}/applications/gzdoom.desktop

%changelog
* Sun Jul 10 2016 mailaender@opensuse.org
- initial packaging of version 2.1.1 (coincides with ZDoom 2.8.1)