%global upstream_version 83j Name: hyperrogue Version: 8.3 Release: 2.j%{?dist} Summary: An SDL roguelike in a non-euclidean world # The game is under the GPLv2 (src/mtrand.h is under BSD, src/savepng.* is under zlib) and the music under CC-BY (v3) License: GPLv2 and BSD and zlib URL: http://www.roguetemple.com/z/hyper/ Source0: http://www.roguetemple.com/z/hyper/%{name}-%{upstream_version}.zip Source1: %{name}.desktop Source2: %{name}.appdata.xml Source3: http://roguetemple.com/z/hyper/bigicon-osx.png # Add the right location of the font file (DejaVuSans-Bold.ttf) Patch0: %{name}.fixfontlocation.patch Patch1: %{name}.fixflags.patch BuildRequires: SDL_mixer-devel SDL_ttf-devel SDL_gfx-devel BuildRequires: libpng-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib Requires: dejavu-sans-fonts Provides: bundled(mtrand) Provides: bundled(savepng) Recommends: %{name}-music %description You are a lone outsider in a strange, non-Euclidean world. Fight to find treasures and get the fabulous Orbs of Yendor! %package music Requires: %{name} Summary: Music for hyperrogue BuildArch: noarch License: CC-BY %description music Set of 11 music for hypperrogue. %prep %setup -q -n %{name}-%{upstream_version} %patch0 -p1 %patch1 -p1 rm -f src/glew.c # Set the correct path for the music-info file sed -i 's+./hyperrogue-music.txt+%{_datadir}/%{name}/hyperrogue-music.txt+g' src/graph.cpp %build pushd src/ make %{?_smp_mflags} CFLAGS="%{optflags} -fPIC" CPPFLAGS="%{optflags} -fPIC" LDFLAGS="%{__global_ldflags}" popd %install # Upstream not provides "install" target. I have to install files "by hands". mkdir -p %{buildroot}%{_bindir} install -pDm755 -p src/hyper %{buildroot}%{_bindir}/%{name} # Install music files. mkdir -p %{buildroot}%{_datadir}/%{name} install -pDm644 *ogg %{buildroot}%{_datadir}/%{name}/ install -pDm644 hyperrogue-music.txt %{buildroot}%{_datadir}/%{name}/ # Install the desktop file. desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} mkdir -p %{buildroot}%{_datadir}/pixmaps/ install -pDm644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{name}.png # Install the appdata file. mkdir %{buildroot}%{_datadir}/appdata/ install -pDm644 %{SOURCE2} %{buildroot}%{_datadir}/appdata/ %check #Test the appdata file. appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml # Under GPLv2 %files #%%license COPYING %{_bindir}/%{name} %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/%{name}.appdata.xml # Under CC-BY %files music %{_datadir}/%{name} %changelog * Sat Nov 19 2016 8.3-2.j - Add mtrand as a bundled lib, and add BSD licence - Add savepng as a bundled lib, and add zlib license - Update appdata.xml file with new licence and open age rating * Sat Mar 12 2016 Alexandre Moine 8.3-1.j - Update to new upstream - Make music subpackage a noarch subpackage - Add lipng-devel as a new BuildRequires - Update appdata file - Update desktop file (thanks RĂ©mi Verschelde) * Sat Mar 12 2016 Alexandre Moine 7.4-1.h - Update to new upstream - Force code relocation with -fPIC - Remove license: COPYING, since the file was removed by upstream (I contact them about it) * Thu Aug 06 2015 Alexandre Moine 6.6-1 - Update to new upstream. - Create a subpackage for music. - Set the correct path for the music-info file. - Fix typo. * Sat May 09 2015 Alexandre Moine 5.5-0.3.a - Use right versioning rules. * Tue Mar 24 2015 Alexandre Moine 5.5a-2 - Use install instead of cp. - Add a correct test of the .appadata.xml file * Tue Mar 17 2015 Alexandre Moine 5.5a-1 - Update to the new 5.5a - Remove the manual install of VeraBD.ttf, not used anymore, replaced by DejaVuSans-Bold.ttf. - Patch the code to use the fedora DejaVuSans-Bold.ttf file. - The problem with the executable is solved, put it back in %%{_bindir} * Sat Nov 15 2014 Alexandre Moine 4.4-4 - Remove the explicit Requires: SDL_mixer SDL_ttf SDL_gf * Mon Oct 27 2014 Alexandre Moine 4.4-3 - Chmod the executable to 755 - Change the icon for a wider - Add an appdata file * Sat Oct 25 2014 Alexandre Moine 4.4-2 - Change %%{_datadir} to %%{_libdir} for the arch-dependent binairie * Wed Oct 22 2014 Alexandre Moine 4.4-1 - Original spec