File warmux.spec of Package warmux

#
# spec file for package warmux
#
# Copyright (c) 2025 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:           warmux
Version:        11.04.1
Release:        0
Summary:        Free Worms(R) like Game
License:        GPL-2.0-only
Group:          Amusements/Games/Action/Shoot
URL:            http://gna.org/projects/warmux/
Source:         https://download.gna.org/warmux/warmux-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM 01_fix_repack_configure.patch copied from Debian
Patch1:         01_fix_repack_configure.patch
# PATCH-FIX-UPSTREAM 02_desktop_file.patch copied from Debian
Patch2:         02_desktop_file.patch
# PATCH-FIX-UPSTREAM 03_respect_build_flags_from_env.patch copied from Debian
Patch3:         03_respect_build_flags_from_env.patch
# PATCH-FIX-UPSTREAM 04_fix_build_kfreebsd.patch copied from Debian
Patch4:         04_fix_build_kfreebsd.patch
# PATCH-FIX-UPSTREAM 05_fix_build_libpng15.patch copied from Debian
Patch5:         05_fix_build_libpng15.patch
# PATCH-FIX-UPSTREAM 06_fix_build_sdlnet.patch copied from Debian
Patch6:         06_fix_build_sdlnet.patch
# PATCH-FIX-UPSTREAM 07_fix_build_gcc47.patch copied from Debian
Patch7:         07_fix_build_gcc47.patch
# PATCH-FIX-UPSTREAM 08_fix_dirlisting.patch copied from Debian
Patch8:         08_fix_dirlisting.patch
# PATCH-FIX-UPSTREAM 09_translation_fixes_de.patch copied from Debian
Patch9:         09_translation_fixes_de.patch
# PATCH-FIX-UPSTREAM 10_fix_build_gcc60.patch copied from Debian
Patch10:        10_fix_build_gcc60.patch
BuildRequires:  gcc-c++
BuildRequires:  libSDL_net-devel
BuildRequires:  libSDL_ttf-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(SDL_gfx)
BuildRequires:  pkgconfig(SDL_image)
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(fribidi)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(sdl)
%if 0%{?suse_version}
BuildRequires:  fdupes
%endif

%description
Almost everyone has heard of the Worms(R) series of games, developed by
Team17. Worms was created in 1990, the goal of the game consisting of a
several teams of "worms" fighting to the death on a 2D map. Wormux is heavily
influenced by all games in this genre, including Scorched Earth and Liero.

Warmux is free software clone of this game concept with lots of weapons
(Dynamite, Baseball Bat, Teleportation, etc.). There are also lots of maps
available for your battling pleasure! Warmux takes the genre to the next
level, with great customisation options leading to great gameplay. There is a
wide selection of teams, from the Aliens to the Chickens. Also, new
battlefields can be downloaded from the Internet, making strategy an important
part of each battle.

%prep
%setup -q -n %{name}-11.04
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
%patch -P 8 -p1
%patch -P 9 -p1
%patch -P 10 -p1

%build
%configure --enable-servers --enable-fribidi
%make_build

%install
%make_install

rm %{buildroot}/%{_datadir}/applications/%{name}_files.desktop
rm %{buildroot}/%{_datadir}/%{name}/.nomedia
mv %{buildroot}/%{_datadir}/locale/ja_JP %{buildroot}/%{_datadir}/locale/ja
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
ln -s %{_datadir}/%{name}/icon/%{name}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/

%if 0%{?suse_version}
%fdupes -s %{buildroot}
%endif

%find_lang %{name}

%files -f %{name}.lang
%license COPYING
%doc AUTHORS ChangeLog TODO
%{_mandir}/man6/%{name}.6%{?ext_man}
%{_bindir}/%{name}
%{_bindir}/%{name}-list-games
%{_bindir}/%{name}-index-server
%{_bindir}/%{name}-server
%{_datadir}/%{name}
%{_datadir}/pixmaps/*
%{_datadir}/icons/hicolor/
%{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by