File angband.spec of Package angband

#
# spec file for package angband
#
# 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:           angband
Version:        4.2.5
Release:        0
Summary:        Classical roguelike game
License:        GPL-2.0-only
Group:          Amusements/Games/RPG
URL:            https://rephial.org/
Source:         https://github.com/angband/angband/releases/download/%{version}/Angband-%{version}.tar.gz
Patch1:         angband-enable-buildopt.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  hicolor-icon-theme
BuildRequires:  ncurses-devel
BuildRequires:  pkgconfig
BuildRequires:  python3-docutils
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_ttf)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(x11)

%description
Angband is a free, single-player dungeon exploration game where you take the
role of an adventurer, exploring a deep dungeon, fighting monsters, and
acquiring the best weaponry you can, in preparation for a final battle with
Morgoth, the Lord of Darkness.

%prep
%autosetup -p1 -n Angband-%{version}

%build
autoreconf -vfi
%configure \
  --with-private-dirs \
  --enable-curses \
  --enable-x11 \
  --enable-sdl2 \
  --enable-test \
  --enable-stats

%make_build

%install
%make_install

for size in 16 32 128 256; do
  mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/
  ln -sf %{_datadir}/%{name}/icons/att-${size}.png \
      %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/%{name}.png
done

ln -sf %{_datadir}/angband/icons/att-512.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/angband.png

%files
%doc docs/faq.rst changes.txt
%license docs/copying.rst docs/thanks.rst
%{_bindir}/angband
%{_datadir}/angband/
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/512x512/apps/angband.png
%{_datadir}/icons/hicolor/256x256/apps/angband.png
%{_datadir}/icons/hicolor/128x128/apps/angband.png
%{_datadir}/icons/hicolor/16x16/apps/angband.png
%{_datadir}/icons/hicolor/32x32/apps/angband.png
%{_datadir}/metainfo/angband.metainfo.xml

%config %{_sysconfdir}/%{name}/

%changelog
openSUSE Build Service is sponsored by