File freedroidrpg.spec of Package freedroidrpg

#
# spec file for package freedroidrpg
#
# 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:           freedroidrpg
Version:        1.0
Release:        0
Summary:        Role playing game with Freedroid theme and Tux as the hero
License:        GPL-2.0-or-later
Group:          Amusements/Games/Action/Arcade
URL:            https://freedroid.sourceforge.net/
Source0:        https://ftp.osuosl.org/pub/freedroid/freedroidRPG-%{version}/freedroidRPG-%{version}.tar.gz
Source1:        %{name}.desktop
#PATCH-FIX-OPENSUSE - freedroidrpg-reproducible.patch - Credits: https://sources.debian.org/patches/freedroidrpg/1.0-1/reproducible.patch
Patch0:         freedroidrpg-reproducible.patch
BuildRequires:  ImageMagick
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  libjpeg-devel
BuildRequires:  pkgconfig
BuildRequires:  SDL_net-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL_gfx)
BuildRequires:  pkgconfig(SDL_image)
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(SDL_net)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(lua)
BuildRequires:  pkgconfig(sdl)
BuildRequires:  pkgconfig(vorbis)
Requires:       %{name}-data = %{version}
%if %{suse_version} < 1600
BuildRequires:  python39-devel
%else
BuildRequires:  pkgconfig(python3)
%endif

%description
FreedroidRPG is an open source role playing game.

The game tells the story of a world destroyed by a conflict between robots and their human masters.
Play as Tux in a quest to save the world from the murderous rebel bots who know no mercy.
You get to choose which path you wish to follow, and freedom of choice is everywhere in the game.

FreedroidRPG features a real time combat system with melee and ranged weapons, fairly similar to
the proprietary game Diablo. There is an innovative system of programs that can be run in order
to take control of enemy robots, alter their behavior, or improve one's characteristics.
You can use over 50 different kinds of items and fight countless enemies on your way to your destiny.
An advanced dialog system provides story background and immersive role playing situations.

The game is complete, fully playable, and can provide about 12 hours of fun.
It is still being actively developed, and help is welcome in many areas.
People having - or trying to acquire - programming, map editing, or writing skills will find FreedroidRPG
to be an exciting, fast-moving project in which they can fully express their creativity.

%package data
Summary:        Data files for Freedroid RPG
Group:          Amusements/Games/Action/Arcade
Requires:       %{name} = %{version}
BuildArch:      noarch

%description data
Data files for game Freedroid RPG.

%prep
%setup -q
%patch -P 0 -p1

%build

export CPPFLAGS="$CPPFLAGS -fcommon -fPIE"
%configure --disable-dependency-tracking \
           --docdir=%{_datadir}/doc/packages/%{name}
%make_build

%install
%make_install

# Install desktop file
desktop-file-install \
  --dir %{buildroot}%{_datadir}/applications \
  %{SOURCE1}

# Fix permissions, remove extra junk
find %{buildroot}%{_datadir}/%{name} -type f -exec chmod -x "{}" \;
rm -f %{buildroot}%{_datadir}/applications/org.freedroid.freedroidRPG.desktop
rm -f %{buildroot}%{_datadir}/%{name}/data/storyline/act2/titles/ERASEME
rm -f %{buildroot}%{_datadir}/%{name}/data/storyline/empty_map/dialogs/ERASEME
rm -f %{buildroot}%{_datadir}/%{name}/data/storyline/empty_map/titles/ERASEME 
rm -f %{buildroot}%{_datadir}/%{name}/data/sound/speak.py

%find_lang freedroidrpg
%find_lang freedroidrpg-data
%find_lang freedroidrpg-dialogs
cat freedroidrpg-data.lang >> freedroidrpg.lang
cat freedroidrpg-dialogs.lang >> freedroidrpg.lang
rm -f freedroidrpg-data.lang
rm -f freedroidrpg-dialogs.lang

%fdupes %{buildroot}%{_datadir}

%files -f freedroidrpg.lang
%license COPYING
%doc AUTHORS README* NEWS CONTRIBUTING.md
%{_bindir}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/metainfo/org.freedroid.freedroidRPG.appdata.xml
%{_datadir}/icons/*
%{_mandir}/man6/freedroidRPG.6.*

%files data
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by