File tuxanci.spec of Package tuxanci
#
# spec file for package tuxanci
#
# 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: tuxanci
Version: 0.21.0
Release: 0
Summary: Arcade game - 2 tuxes fighting in arena
License: GPL-2.0-only
Group: Amusements/Games/Action/Shoot
URL: http://www.tuxanci.org/
Source: http://download.tuxanci.org/%{name}-%{version}.tar.bz2
Source1: %{name}.svg
Patch0: %{name}-remove_version.patch
Patch1: tuxanci-add-ldl.patch
# PATCH-FIX-UPSTREAM tuxanci-Port-to-ISO-C23.patch - fixes building with gcc15 - https://src.fedoraproject.org/rpms/tuxanci/tree/rawhide
Patch2: tuxanci-Port-to-ISO-C23.patch
BuildRequires: cmake >= 2.6.0
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: zziplib-devel
BuildRequires: pkgconfig(SDL_image)
BuildRequires: pkgconfig(SDL_mixer)
BuildRequires: pkgconfig(SDL_net)
BuildRequires: pkgconfig(SDL_ttf)
BuildRequires: pkgconfig(sdl)
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%description
Tuxánci is first cushion shooter based on well-known Czech game Bulánci.
Game supports 1 player and multiplayer game on one computer and also
supports gameplay over network (LAN/Internet [IPv4 and IPv6]).
Goal in this game is to shoot enemy penguin before he does so. Penguin
can shoot only in X and Y axes so no diagonal shooting is availible.
%prep
%setup -q
%patch -P 0
%patch -P 1 -p1
%patch -P 2 -p1
%build
export CMAKE_POLICY_VERSION_MINIMUM=3.5
export CFLAGS="%{optflags} -ldl"
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_DATA_PATH=%{_datadir} \
-DCMAKE_CONF_PATH=%{_sysconfdir} -DCMAKE_LIB_PATH=%{_libdir} \
-DCMAKE_DOC_PATH=%{_docdir} -DCMAKE_LOCALE_PATH=%{_datadir}/locale
%make_build
%install
%make_install DESTDIR=%{buildroot}
# Icon, it is simple official icon
install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.svg
rm -f %{buildroot}/%{_docdir}/%{name}/%{name}.svg
# Desktop entry
install -D -m 644 data/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%suse_update_desktop_file -r %{name} Game ActionGame
%endif
# remove redundant files
rm %{buildroot}%{_docdir}/%{name}/LICENCE
%fdupes %{buildroot}%{_datadir}/%{name}/*
%files
%license LICENCE
%doc AUTHORS README
%{_bindir}/%{name}
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/arena
%{_datadir}/%{name}/arena/*
%dir %{_datadir}/%{name}/font
%{_datadir}/%{name}/font/*
%dir %{_datadir}/%{name}/images
%{_datadir}/%{name}/images/*
%dir %{_datadir}/%{name}/music
%{_datadir}/%{name}/music/*
%dir %{_datadir}/%{name}/sound
%{_datadir}/%{name}/sound/*
%{_datadir}/pixmaps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%changelog