File ezquake.spec of Package ezquake

#
# spec file for package ezquake
#
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# 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:           ezquake
Version:        3.2.3
Release:        0
Summary:        A modern QuakeWorld client
License:        GPL-2.0-or-later
Group:          Amusements/Games/3D/Shoot
URL:            https://www.ezquake.com/
#Git-Clone:     https://github.com/ezQuake/ezquake-source.git
Source:         https://github.com/ezQuake/ezquake-source/archive/refs/tags/%{version}.tar.gz#/%{name}-source-%{version}.tar.gz
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(expat)
BuildRequires:  pkgconfig(jansson)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(speex)
BuildRequires:  pkgconfig(xxf86vm)

%description
ezQuake is a modern QuakeWorld engine. It adds many useful features like
modern graphics, QuakeTV support, multi-monitor support, a built-in
server browser, and many features serving the nedes of competitive Quake
gamers.

QuakeWorld itelf is a variant of the Quake engine designed specifically
for online gameplay.

Game data must be placed in ~/.ezquake/id1 .

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

%build
export CFLAGS="%{optflags}"
%make_build
strip ezquake-linux-*

%install
install -Dm 0755 ezquake-linux-* %{buildroot}%{_libexecdir}/ezquake/ezquake
install -d %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/ezquake << EOF
#!/bin/sh
gamedir="\$HOME"/.ezquake
test -d "\$gamedir" || mkdir -p "\$gamedir"
test -L "\$gamedir"/ezquake || ln -s %{_libexecdir}/ezquake/ezquake "\$gamedir"/ezquake

%{_libexecdir}/ezquake/ezquake -basedir "\$gamedir" "\$@"
EOF

%files
%license LICENSE
%doc CHANGELOG README.md
%attr(0755,root,root) %{_bindir}/ezquake
%{_libexecdir}/%{name}

%changelog
openSUSE Build Service is sponsored by