File wargus.spec of Package wargus

#
# spec file for package wargus
#
# 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:           wargus
Version:        3.3.2
Release:        0
Summary:        Warcraft II mod for the Stratagus engine
License:        GPL-2.0-or-later
Group:          Amusements/Games/Strategy/Real Time
URL:            https://wargus.github.io/
Source:         https://github.com/Wargus/wargus/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  StormLib-devel
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  stratagus-devel = %{version}
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libmikmod)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(zlib)
Recommends:     ffmpeg
Requires:       stratagus = %{version}

%description
Wargus is a Warcraft2 Mod that allows you to play Warcraft2 with the Stratagus engine, as
opposed to play it with the original Warcraft2 one. So unless you have a legal copy of
Warcraft2 (original DOS Version required, won't work with the battle.net edition) Wargus
will be pretty useless to you, since it doesn't come with any graphics or sounds itself.

%prep
%setup -q

%build
%cmake -DGAMEDIR=%{_bindir}
%make_jobs

%install
install -D -m 0644 doc/%{name}.6 %{buildroot}%{_mandir}/man6/%{name}.6
install -D -m 0644 doc/wartool.6 %{buildroot}%{_mandir}/man6/wartool.6
install -D -m 0644 doc/pudconvert.6 %{buildroot}%{_mandir}/man6/pudconvert.6
%cmake_install

# remove shebang from generate_tables.py - fixes rpmlint non-executable-script warning
sed -i 1d %{buildroot}%{_datadir}/games/stratagus/wargus/scripts/translate/generate_tables.py

%fdupes %{buildroot}%{_datadir}/games/stratagus/wargus

%files
%license COPYING
%doc README.md doc/changelog doc/pud-specs.txt
%{_mandir}/man6/wargus.6%{?ext_man}
%{_mandir}/man6/wartool.6%{?ext_man}
%{_mandir}/man6/pudconvert.6%{?ext_man}
%{_bindir}/wargus
%{_bindir}/pudconvert
%{_bindir}/wartool
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/games/stratagus
%{_datadir}/games/stratagus/wargus

%changelog
openSUSE Build Service is sponsored by