diff --git a/.gitignore b/.gitignore index 341b498..7c2ba45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +results_* +*.rpm /angband-4.2.3-norestricted.tar.gz -/angband.png /angband-4.2.4-norestricted.tar.gz +/angband-4.2.5-norestricted.tar.gz diff --git a/angband-4.2.5-1-desktop_fix.patch b/angband-4.2.5-1-desktop_fix.patch new file mode 100644 index 0000000..1491e2a --- /dev/null +++ b/angband-4.2.5-1-desktop_fix.patch @@ -0,0 +1,12 @@ +diff -ruN angband-4.2.5-orig/lib/icons/angband-sdl2.desktop angband-4.2.5/lib/icons/angband-sdl2.desktop +--- angband-4.2.5-orig/lib/icons/angband-sdl2.desktop 2023-09-07 15:07:36.000000000 -0300 ++++ angband-4.2.5/lib/icons/angband-sdl2.desktop 2023-09-07 16:55:05.425130296 -0300 +@@ -2,7 +2,7 @@ + Name=Angband (SDL2) + Type=Application + Comment=A roguelike dungeon exploration game based on the books of J.R.R.Tolkien +-Exec=sh -c "if [ \\$XDG_SESSION_TYPE == \"wayland\" ]; then env SDL_VIDEODRIVER=wayland angband -msdl2; else angband -msdl2; fi" ++Exec=angband-sdl + TryExec=angband + Icon=angband + Categories=Game;RolePlaying; diff --git a/angband-sdl b/angband-sdl new file mode 100644 index 0000000..e1e6196 --- /dev/null +++ b/angband-sdl @@ -0,0 +1,23 @@ +#!/usr/bin/bash + +RUN_SDL=1 + +MESSAGE="\ +Angband (SDL) doesn't work on Gnome Desktop because GTK+ refuses to initialize on excecutables that require the setgid feature.\n\n\ +Run Angband (X11) instead?" + + +if [[ "$DESKTOP_SESSION" == "gnome" ]]; then + zenity \ + --title="Warning" \ + --icon="dialog-warning" \ + --question \ + --text "$MESSAGE" + RUN_SDL=$? +fi + +if [[ "$RUN_SDL" == "0" ]]; then + angband -mx11 +else + angband -msdl2 +fi \ No newline at end of file diff --git a/angband.desktop b/angband.desktop deleted file mode 100644 index 0e33193..0000000 --- a/angband.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Angband (SDL2) -Type=Application -Comment=A roguelike dungeon exploration game based on the books of J.R.R.Tolkien -Exec=sh -c "if [ \\$XDG_SESSION_TYPE == \"wayland\" ]; then env SDL_VIDEODRIVER=wayland angband -msdl2; else angband -msdl2; fi" -TryExec=angband -Icon=angband -Categories=Game;RolePlaying; diff --git a/angband.metainfo.xml b/angband.metainfo.xml deleted file mode 100644 index aeedd32..0000000 --- a/angband.metainfo.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - angband - angband.desktop - Angband - CC0-1.0 - GPL-2.0 - Angband is a free, single-player dungeon exploration game. - -

- A roguelike game where you explore a very deep - dungeon, kill monsters, try to equip yourself with - the best weapons and armor you can find, and finally - face Morgoth - "The Dark Enemy". -

-
- https://angband.github.io/angband/ - https://angband.readthedocs.io/en/latest/ - https://github.com/angband/angband/issues - - - Title screen - https://github.com/angband/angband/raw/master/screenshots/title.png - - - Gameplay - https://github.com/angband/angband/raw/master/screenshots/game.png - - - - Game - RolePlaying - -
\ No newline at end of file diff --git a/angband.spec b/angband.spec index 4f3a740..e88ff10 100644 --- a/angband.spec +++ b/angband.spec @@ -1,9 +1,10 @@ Name: angband -Version: 4.2.4 -Release: 4%{?dist} +Version: 4.2.5 +Release: 9%{?dist} Summary: Popular roguelike role playing game -License: GPLv2 +# Automatically converted from old format: GPLv2 - review is highly recommended. +License: GPL-2.0-only URL: https://rephial.org/ Source0: angband-%{version}-norestricted.tar.gz # angband contains assets and code that don't comply to Fedora's @@ -15,11 +16,13 @@ Source1: generate-tarball.sh # The fix-restricted.patch file is used by generate-tarball.sh to fix # the source to work without the restricted assets. Source2: fix-restricted.patch -Source3: angband.desktop -Source4: angband.metainfo.xml +# Add warning when running on gnome desktop +Source3: angband-sdl -# https://github.com/angband/angband/pull/5186 +# Specific Fedora restriction on chown usage during install process Patch0: angband-4.2.4-1-chown_fix.patch +# https://github.com/angband/angband/pull/5751 +Patch1: angband-4.2.5-1-desktop_fix.patch BuildRequires: autoconf BuildRequires: automake @@ -36,6 +39,8 @@ BuildRequires: python3-docutils Requires: hicolor-icon-theme Requires: freetype >= 2.11.0-3 +Requires: xorg-x11-fonts-misc +Requires: zenity Requires: %{name}-data = %{version}-%{release} %description @@ -46,7 +51,8 @@ Morgoth - "The Dark Enemy". %package data Summary: Angband data files -License: GPLv2 and CC-BY +# Automatically converted from old format: GPLv2 and CC-BY - review is highly recommended. +License: GPL-2.0-only AND LicenseRef-Callaway-CC-BY BuildArch: noarch %description data @@ -75,8 +81,7 @@ iconv -f iso8859-1 -t utf-8 \ --with-setgid=games \ --with-gamedata-in-lib \ --enable-sdl2 \ - --enable-sdl2-mixer \ - --disable-x11 + --enable-sdl2-mixer %make_build @@ -88,33 +93,26 @@ install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}/archive install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}/save install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}/panic +# Install both x11 and sdl2 desktop files +rm ${RPM_BUILD_ROOT}%{_datadir}/applications/angband.desktop desktop-file-install \ --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ - %{SOURCE3} - -mkdir -p ${RPM_BUILD_ROOT}%{_metainfodir}/ -install -p -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_metainfodir}/angband.metainfo.xml + lib/icons/angband-sdl2.desktop +desktop-file-install \ + --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ + lib/icons/angband-x11.desktop appstream-util validate-relax --nonet \ ${RPM_BUILD_ROOT}%{_metainfodir}/angband.metainfo.xml -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/16x16/apps/ -install -p -m 644 lib/icons/att-16.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/16x16/apps/angband.png -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/ -install -p -m 644 lib/icons/att-32.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/angband.png -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/128x128/apps/ -install -p -m 644 lib/icons/att-128.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/128x128/apps/angband.png -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/256x256/apps/ -install -p -m 644 lib/icons/att-256.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/256x256/apps/angband.png -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/512x512/apps/ -install -p -m 644 lib/icons/att-512.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/512x512/apps/angband.png - mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6/ install -p -m 644 src/angband.man $RPM_BUILD_ROOT%{_mandir}/man6/angband.6 +install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/angband-sdl %files %license docs/copying.rst %attr(2755,root,games) %{_bindir}/%{name} +%{_bindir}/angband-sdl %{_datadir}/applications/*.desktop %{_metainfodir}/angband.metainfo.xml %dir %{_sysconfdir}/angband @@ -144,6 +142,42 @@ install -p -m 644 src/angband.man $RPM_BUILD_ROOT%{_mandir}/man6/angband.6 %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 4.2.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Wed Jul 23 2025 Fedora Release Engineering - 4.2.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Jan 27 2025 Diego Herrera 4.2.5-7 +- Require xorg-x11-fonts-misc +- Add extra warning when running Angband (SDL) on Gnome + +* Thu Jan 16 2025 Fedora Release Engineering - 4.2.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Aug 28 2024 Miroslav Suchý - 4.2.5-5 +- convert license to SPDX + +* Wed Jul 17 2024 Fedora Release Engineering - 4.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 4.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 4.2.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Sep 7 2023 Diego Herrera 4.2.5-1 +- Updated version to 4.2.5 +- Upstreamed assets +- Enable x11 support + +* Wed Jul 19 2023 Fedora Release Engineering - 4.2.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jan 18 2023 Fedora Release Engineering - 4.2.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Jul 20 2022 Fedora Release Engineering - 4.2.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild @@ -154,7 +188,7 @@ install -p -m 644 src/angband.man $RPM_BUILD_ROOT%{_mandir}/man6/angband.6 - Removed scalable image * Tue Feb 22 2022 Diego Herrera 4.2.4-1 -- Updated to version to 4.2.4 +- Updated version to 4.2.4 - Removed upstreamed patches - Added metainfo file diff --git a/sources b/sources index 311e9b9..6144389 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (angband-4.2.3-norestricted.tar.gz) = 2d0d2c9947a2d1ff1e891c76207e1e7de67e12e2891eb33c29af75b4e8eaa334a7d3cc1a7fd3a52d9a601ec29fc689eec9d6cb4830874bb425f3c1e3747423c7 -SHA512 (angband-4.2.4-norestricted.tar.gz) = 387d04c420bba3f2e14bc18722ea37e867ad5521718c24090d36dd9bc48c33bf390a3b314912b43596bf5edfd3c0044b09ba0a2cc344a1031543a8de5b72a1ee +SHA512 (angband-4.2.5-norestricted.tar.gz) = 6b31d89290c6f916e0d16900faf85b24a79c390836ae87dbf194ad44f1297aab7a213b3c0be3f8a88b27ab163853f3c331209442d851bb081bb28da345c35234