File freesynd.spec of Package freesynd

#
# spec file for package freesynd
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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:           freesynd
Version:        0.8
Release:        0
Summary:        Reimplementation of the classic Bullfrog game Syndicate
License:        GPL-2.0-only
Group:          Amusements/Games/Strategy/Real Time
URL:            https://freesynd.sourceforge.net/
Source:         https://master.dl.sourceforge.net/project/%{name}/%{name}/%{name}-%{version}/Freesynd-%{version}-Source.zip
Patch0:         gcc15.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  unzip
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(zlib)

%description
FreeSynd is a cross-platform, free software reimplemented engine
for the classic Bullfrog game, Syndicate.

The game assets from an original copy of Syndicate are required to play.

%prep
%autosetup -p1 -n Freesynd-%{version}-Source

%build
%cmake \
  -DBUILD_STATIC_LIBS:BOOL=ON \
  -DBUILD_SHARED_LIBS:BOOL=OFF
%make_jobs

%install
%cmake_install
install -D -m0644 packaging/icon/freesynd-logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/freesynd.svg

mkdir -p %{buildroot}%{_datadir}/applications/
cat > %{buildroot}%{_datadir}/applications/freesynd.desktop << EOF
[Desktop Entry]
Type=Application
Name=FreeSynd
GenericName=Tactical RPG
Icon=freesynd
Terminal=false
Exec=freesynd
Categories=Game;RolePlaying;
EOF

rm %{buildroot}%{_docdir}/freesynd/changelog.gz
rm %{buildroot}%{_docdir}/freesynd/copyright

%files
%license COPYING
%doc packaging/ChangeLog README
%dir %{_sysconfdir}/freesynd
%config %{_sysconfdir}/freesynd/freesynd.ini
%{_bindir}/freesynd
%{_datadir}/freesynd
%{_datadir}/icons/hicolor/scalable/apps/freesynd.svg
%{_datadir}/applications/freesynd.desktop

%changelog
openSUSE Build Service is sponsored by