File freeablo.spec of Package freeablo

#
# spec file for package freeablo
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           freeablo
Version:        0.4
Release:        0
Summary:        Modern reimplementation of the Diablo 1 game engine
License:        GPL-3.0-only
Group:          Amusements/Games/RPG
URL:            http://freeablo.org/
Source:         https://github.com/wheybags/freeablo/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  boost-devel >= 1.54
BuildRequires:  cmake >= 3.11
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(python)
BuildRequires:  pkgconfig(zlib)

%description
Freeablo is a modern cross platform reimplementation of the game engine
used in Diablo 1. As it is just an engine, you will need the original
data files to play the game.

%prep
%setup -q

%build
mkdir -p build
cd build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=%{_prefix} ../
make %{?_smp_mflags}

%install
%cmake_install

rm %{buildroot}%{_prefix}/changelog.md
mkdir -p %{buildroot}%{_libexecdir}/%{name}
mv %{buildroot}%{_bindir} %{buildroot}%{_libexecdir}/%{name}
mv %{buildroot}%{_prefix}/resources %{buildroot}%{_libexecdir}/%{name}

mkdir -p %{buildroot}%{_bindir}
cat <<EOT >>%{buildroot}%{_bindir}/%{name}
#!/bin/sh
cd %{_libexecdir}/%{name}
bin/launcher
cd -
EOT
chmod +x %{buildroot}%{_bindir}/%{name}

%files
%defattr(-,root,root)
%license LICENSE.TXT
%doc readme.md changelog.md
%{_bindir}/%{name}
%{_libexecdir}/%{name}

%changelog
openSUSE Build Service is sponsored by