File yamagi-quake2-zaero.spec of Package yamagi-quake2-zaero

#
# spec file for package yamagi-quake2-zaero
#
# Copyright (c) 2024 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/
#


#
%define base_name zaero

Name:           yamagi-quake2-zaero
Version:        1
Release:        0
Summary:        Zaero 3rd mission pack for quake 2
License:        NonFree
URL:            https://github.com/yquake2/zaero
Source0:        _service
Source1:        yquake2-zaero.desktop
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  update-desktop-files
BuildRequires:  yamagi-quake2
Requires:       yamagi-quake2

%description
This is a bugfixed version of Team Evolve's Quake II missionpack
"Zaero". Hundred bugs were fixed, this version should run much more
stable than the the old SDK version. It must be used with the "Yamagi
Quake II Client". For more information visit http://www.yamagi.org/quake2.

ATTENTION: This port of Zaero to Yamagi Quake II is unfinished and
untested! While it might work there are most likely a lot of bugs left!
Furthermore this code needs more cleanup! Do not complain if you run
into problem! Patches (or better pull requests) are welcome. :)

This package provides the Quake II - Mission Pack 3 ('Zaero').

%prep
%setup -q -n %_sourcedir/%base_name-%version -T -D

%build
%cmake
%make_jobs

%install
install -D -m 644 LICENSE %{buildroot}%{_licensedir}/%name/LICENSE
install -D -m 644 README %{buildroot}%{_docdir}/%name/README
install -dm 755 %{buildroot}%{_bindir}
install -Dpm 644 build/game.so %{buildroot}%{_libexecdir}/yamagi-quake2/zaero/game.so
echo -e "#!/bin/sh\nexec %{_libexecdir}/yamagi-quake2/yquake2 \+set game zaero \"\$@\"" > %{buildroot}%{_bindir}/yquake2-zaero
chmod 755 %{buildroot}%{_bindir}/yquake2-zaero

%suse_update_desktop_file -i yquake2-zaero

%files
%license LICENSE
%doc README
%{_bindir}/yquake2-zaero
%dir %{_libexecdir}/yamagi-quake2/zaero
%{_libexecdir}/yamagi-quake2/zaero/game.so
%{_datadir}/applications/yquake2-zaero.desktop

%changelog
openSUSE Build Service is sponsored by