a1e0b28
Name:    angband
007036b
Version: 4.2.4
fe77df3
Release: 2%{?dist}
a1e0b28
Summary: Popular roguelike role playing game
a1e0b28
a1e0b28
License: GPLv2
a1e0b28
URL:     https://rephial.org/
a1e0b28
Source0: angband-%{version}-norestricted.tar.gz
a1e0b28
# angband contains assets and code that don't comply to Fedora's 
a1e0b28
# licensing restrictions. Therefore we use this script to download 
a1e0b28
# and remove the restricted files before shipping it.
a1e0b28
# Invoke this script to download and generate a patched tarball:
a1e0b28
# ./generate-tarball.sh
a1e0b28
Source1: generate-tarball.sh
a1e0b28
# The fix-restricted.patch file is used by generate-tarball.sh to fix
a1e0b28
# the source to work without the restricted assets.
a1e0b28
Source2: fix-restricted.patch
a1e0b28
Source3: angband.desktop
007036b
Source4: angband.metainfo.xml
a1e0b28
a1e0b28
# https://github.com/angband/angband/pull/5186
007036b
Patch0: angband-4.2.4-1-chown_fix.patch
007036b
007036b
BuildRequires: autoconf
007036b
BuildRequires: automake
007036b
BuildRequires: libappstream-glib
007036b
BuildRequires: make
007036b
BuildRequires: ncurses-devel
007036b
BuildRequires: desktop-file-utils
007036b
BuildRequires: gcc
007036b
BuildRequires: SDL2-devel
007036b
BuildRequires: SDL2_image-devel
007036b
BuildRequires: SDL2_ttf-devel
007036b
BuildRequires: SDL2_mixer-devel
007036b
BuildRequires: python3-docutils
a1e0b28
a1e0b28
Requires: hicolor-icon-theme
81ab37b
Requires: freetype >= 2.11.0-3
a1e0b28
Requires: %{name}-data = %{version}-%{release}
a1e0b28
a1e0b28
%description
a1e0b28
A roguelike game where you explore a very deep dungeon, kill monsters, try to
a1e0b28
equip yourself with the best weapons and armor you can find, and finally face
a1e0b28
Morgoth - "The Dark Enemy".
a1e0b28
a1e0b28
a1e0b28
%package data
a1e0b28
Summary: Angband data files
a1e0b28
License: GPLv2 and CC-BY
a1e0b28
BuildArch: noarch
a1e0b28
a1e0b28
%description data
a1e0b28
Data files for the Angband game
a1e0b28
a1e0b28
a1e0b28
%package doc
a1e0b28
Summary: Angband doc files
a1e0b28
a1e0b28
%description doc
a1e0b28
Documentation about the Angband game
a1e0b28
a1e0b28
a1e0b28
%prep
a1e0b28
%autosetup -p1
a1e0b28
./autogen.sh
a1e0b28
a1e0b28
# file-not-utf8 fix
a1e0b28
iconv -f iso8859-1 -t utf-8 \
a1e0b28
    docs/version.rst > docs/version.rst.conv && \
a1e0b28
    mv -f docs/version.rst.conv docs/version.rst
a1e0b28
a1e0b28
a1e0b28
%build
a1e0b28
%configure \
a1e0b28
    --with-setgid=games \
a1e0b28
    --with-gamedata-in-lib \
a1e0b28
    --enable-sdl2 \
a1e0b28
    --enable-sdl2-mixer \
a1e0b28
    --disable-x11
a1e0b28
%make_build
a1e0b28
a1e0b28
a1e0b28
%install
a1e0b28
%make_install
a1e0b28
install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}
a1e0b28
install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}/scores
a1e0b28
install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}/archive
a1e0b28
install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}/save
007036b
install -d $RPM_BUILD_ROOT/%{_var}/games/%{name}/panic
a1e0b28
a1e0b28
desktop-file-install \
a1e0b28
    --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
a1e0b28
    %{SOURCE3}
007036b
007036b
mkdir -p ${RPM_BUILD_ROOT}%{_metainfodir}/
007036b
install -p -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_metainfodir}/angband.metainfo.xml
007036b
appstream-util validate-relax --nonet \
007036b
    ${RPM_BUILD_ROOT}%{_metainfodir}/angband.metainfo.xml
007036b
fe77df3
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/16x16/apps/
fe77df3
install -p -m 644 lib/icons/att-16.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/16x16/apps/angband.png
fe77df3
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/
fe77df3
install -p -m 644 lib/icons/att-32.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/angband.png
81ab37b
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/128x128/apps/
81ab37b
install -p -m 644 lib/icons/att-128.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/128x128/apps/angband.png
81ab37b
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/256x256/apps/
81ab37b
install -p -m 644 lib/icons/att-256.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/256x256/apps/angband.png
81ab37b
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/512x512/apps/
81ab37b
install -p -m 644 lib/icons/att-512.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/512x512/apps/angband.png
a1e0b28
a1e0b28
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6/
a1e0b28
install -p -m 644 src/angband.man $RPM_BUILD_ROOT%{_mandir}/man6/angband.6
a1e0b28
a1e0b28
a1e0b28
%files
a1e0b28
%license docs/copying.rst
a1e0b28
%attr(2755,root,games) %{_bindir}/%{name}
a1e0b28
%{_datadir}/applications/*.desktop
007036b
%{_metainfodir}/angband.metainfo.xml
a1e0b28
%dir %{_sysconfdir}/angband
a1e0b28
%dir %{_sysconfdir}/angband/customize
a1e0b28
%config(noreplace) %{_sysconfdir}/angband/customize/*
a1e0b28
%dir %attr(0775,root,games) %{_var}/games/%{name}
a1e0b28
%dir %attr(2775,root,games) %{_var}/games/%{name}/scores
a1e0b28
%dir %attr(2775,root,games) %{_var}/games/%{name}/archive
a1e0b28
%dir %attr(2775,root,games) %{_var}/games/%{name}/save
007036b
%dir %attr(2775,root,games) %{_var}/games/%{name}/panic
fe77df3
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
fe77df3
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
81ab37b
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
81ab37b
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
81ab37b
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
a1e0b28
%{_mandir}/man6/angband.*
a1e0b28
a1e0b28
a1e0b28
%files data
a1e0b28
%license docs/copying.rst
a1e0b28
%{_datadir}/angband
a1e0b28
a1e0b28
a1e0b28
%files doc
a1e0b28
%license docs/copying.rst
a1e0b28
%doc docs/*.rst
a1e0b28
a1e0b28
a1e0b28
%changelog
fe77df3
* Tue Feb 22 2022 Diego Herrera <dherrera@redhat.com> 4.2.4-2
fe77df3
- Removed scalable image
81ab37b
007036b
* Tue Feb 22 2022 Diego Herrera <dherrera@redhat.com> 4.2.4-1
007036b
- Updated to version to 4.2.4
007036b
- Removed upstreamed patches
007036b
- Added metainfo file
007036b
81ab37b
* Tue Jan 25 2022 Diego Herrera <dherrera@redhat.com> 4.2.3-6
81ab37b
- Update desktop file
81ab37b
- Use icons provided by source
81ab37b
- Changed freetype minimal required version
81ab37b
a918e74
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.3-5
a918e74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
a918e74
a1e0b28
* Mon Jan 10 2022 Diego Herrera <dherrera@redhat.com> 4.2.3-4
a1e0b28
- Added make as an expicit BuildRequires
a1e0b28
- Removed Requires that can be autodetected
a1e0b28
- Fixed licensing description
a1e0b28
- Use macros when needed
a1e0b28
- Separated doc files into a separate package
a1e0b28
- Added license to subpackages
a1e0b28
- Added some missing folders in the installation process
a1e0b28
a1e0b28
* Mon Dec 13 2021 Diego Herrera <dherrera@redhat.com> 4.2.3-3
a1e0b28
- Move customize folder to sysconfdir
a1e0b28
- Add patch to keep the gamedata folder to datadir
a1e0b28
- Add references to upstream patches
a1e0b28
a1e0b28
* Sun Dec 12 2021 Diego Herrera <dherrera@redhat.com> 4.2.3-2
a1e0b28
- Restored Adam Bolt's tileset
a1e0b28
- Fix typos and descriptions
a1e0b28
a1e0b28
* Sat Dec 11 2021 Diego Herrera <dherrera@redhat.com> 4.2.3-1
a1e0b28
- Update to 4.2.3
a1e0b28
- Use setgid mode with games group
a1e0b28
- Change default renderer to SDL2
a1e0b28
- Apply upstream fixes to SDL2 implementation
a1e0b28
- Remove more restricted assets
a1e0b28
- Move game data to datadir
a1e0b28
a1e0b28
* Sun Aug 25 2019 Wart <wart at kobold dot org> 4.2.0-1
a1e0b28
- Update to 4.2.0
a1e0b28
- Fix group creation
a1e0b28
- Fix desktop file
a1e0b28
- Update license naming
a1e0b28
- Add man page
a1e0b28
- Remove restricted tileset
a1e0b28
a1e0b28
* Tue Aug 13 2019 Wart <wart at kobold dot org> 4.1.3-4
a1e0b28
- Use recommended dynamic allocation for the group
a1e0b28
a1e0b28
* Sat Aug 10 2019 Wart <wart at kobold dot org> 4.1.3-3
a1e0b28
- Minor spec file cleanup
a1e0b28
a1e0b28
* Wed Jul 24 2019 Wart <wart at kobold dot org> 4.1.3-2
a1e0b28
- Enable shared scoreboard file
a1e0b28
a1e0b28
* Sun Jul 21 2019 Wart <wart at kobold dot org> 4.1.3-1
a1e0b28
- Update to 4.1.3
a1e0b28
a1e0b28
* Sun Jul 21 2019 Wart <wart at kobold dot org> 3.0.6-5
a1e0b28
- Updates to build for Fedora 30
a1e0b28
a1e0b28
* Wed Apr 4 2007 Wart <wart at kobold dot org> 3.0.6-4
a1e0b28
- Add BR: to allow X11 support
a1e0b28
a1e0b28
* Tue Apr 3 2007 Wart <wart at kobold dot org> 3.0.6-3
a1e0b28
- Add icon name to .desktop files
a1e0b28
- Fix License tag
a1e0b28
- Move game data to /var/games/angband
a1e0b28
- Remove non-working -graphics desktop file
a1e0b28
a1e0b28
* Mon Apr 2 2007 Wart <wart at kobold dot org> 3.0.6-2
a1e0b28
- Use custom group for setgid as added protection
a1e0b28
- Install extra graphics files
a1e0b28
- Add vendor to .desktop file installation
a1e0b28
a1e0b28
* Thu Mar 29 2007 Wart <wart at kobold dot org> 3.0.6-1
a1e0b28
- Update to 3.0.6
a1e0b28
- Updated spec to Fedora Extras standards (again)
a1e0b28
a1e0b28
* Sat Feb 25 2006 Wart <wart at kobold dot org> 3.0.3-5
a1e0b28
- Update. spec to Fedora Extras standards