File gav.spec of Package gav

#
# spec file for package gav
#
# Copyright (c) 2022 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:           gav
Version:        0.9.0
Release:        0
Summary:        Clone of Arcade Volleyball
License:        GPL-2.0
Group:          Amusements/Games/Action/Arcade
URL:            http://gav.sourceforge.net
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}-themes-0.7.3.tar.bz2
BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_net-devel
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  fdupes

%description
An SDL-based rendition of an old favorite CGA game featuring
two characters playing a volleyball-like game. This "revamped"
version is supposed to support theming, multiplayer games,
different input devices and networking.

%prep
%setup -q -b1
sed -i 's|share/games|share|' Makefile* Theme.h
sed -i '1i #include <cstring>' aarg.h
./build_linux.sh

%build
%make_build depend
%make_build

%install
install -Dm0755 gav %{buildroot}%{_bindir}/gav
install -Dm0644 package/gav.desktop %{buildroot}%{_datadir}/applications/gav.desktop
%suse_update_desktop_file -r gav Game SportsGame
install -Dm0644 package/gav.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gav.png

mkdir -p %{buildroot}%{_datadir}/gav/themes/classic
cp ../themes/yisus/* %{buildroot}%{_datadir}/gav/themes/classic
rm -rf ../themes/yisus

mkdir -p %{buildroot}%{_datadir}/gav/sounds
cp -a sounds %{buildroot}%{_datadir}/gav/

pushd ../themes
cp -a * %{buildroot}%{_datadir}/gav/themes
popd

%fdupes %{buildroot}%{_datadir}/%{name}

%files
%license LICENSE
%doc README CHANGELOG
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png

%changelog
openSUSE Build Service is sponsored by