A new user interface for you! Read more...

File doom64ex.spec of Package doom64ex

#
# Spec file for package Doom64EX
#
# Copyright © 2018 Markus S. <kamikazow@opensuse.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

Name:             doom64ex
Summary:          Doom64 engine recreation
Version:          2.5
Release:          0
Group:            Amusements/Games/3D/Shoot
License:          GPL-2.0-or-later
URL:              https://doom64ex.wordpress.com/
Source0:          %{name}-%{version}.tar.xz
BuildRequires:    cmake >= 3.3.2
BuildRequires:    binutils gcc-c++
BuildRequires:    gtk3-devel
BuildRequires:    pkgconfig(fluidsynth)
BuildRequires:    pkgconfig(gl)
BuildRequires:    pkgconfig(libpng)
BuildRequires:    pkgconfig(sdl2)
BuildRequires:    pkgconfig(zlib)
BuildRequires:    SDL2_net-devel
%if 0%{?suse_version} == 1315
%define _cxx g++-7
BuildRequires:    gcc7 gcc7-c++
%else
%define _cxx g++
BuildRequires:    gcc gcc-c++
%endif
Requires(post):   hicolor-icon-theme
Requires(postun): hicolor-icon-theme

%if 0%{?fedora} > 26
# Required for Fedora on OBS
%undefine _debugsource_packages

# Fedora buids fail without this
BuildRequires:    jack-audio-connection-kit-devel
%endif

%description
Doom64EX is a reverse-engineering project aimed to recreate
Doom64 as close as possible with additional modding features.

The game data files required by Doom64EX to function are not
included. To generate these files, acquire a Doom64 ROM and run
type in your terminal:

doom64ex -wadgen PATH_TO_ROM

%prep
%setup -q -n %{name}-%{version}

%build
export CCFLAGS='%{optflags}'
cmake \
      -DCMAKE_CXX_COMPILER=%{_cxx} \
      -DENABLE_SYSTEM_FLUIDSYNTH=ON \
      -DENABLE_GTK3=OFF \
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      .
make -j1

%install
export CCFLAGS='%{optflags}'
make %{?_smp_mflags} install DESTDIR="%{?buildroot}"

# Install icon and launcher
install -Dm 644 distrib/%{name}.png "%{buildroot}/%{_datadir}/icons/hicolor/256x256/apps/%{name}.png"
install -Dm 644 distrib/%{name}.desktop "%{buildroot}/%{_datadir}/applications/%{name}.desktop"

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README.md
%{_bindir}/%{name}
%{_datadir}/games/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png

%changelog