diff --git a/64-cave9-mutante.conf b/64-cave9-mutante.conf new file mode 100644 index 0000000..33f137d --- /dev/null +++ b/64-cave9-mutante.conf @@ -0,0 +1,16 @@ + + + + + fantasy + + Mutante + + + + Mutante + + fantasy + + + diff --git a/cave9-mutante-fontconfig.conf b/cave9-mutante-fontconfig.conf deleted file mode 100644 index f731157..0000000 --- a/cave9-mutante-fontconfig.conf +++ /dev/null @@ -1,16 +0,0 @@ - - - - - fantasy - - Mutante - - - - Mutante - - fantasy - - - diff --git a/cave9.spec b/cave9.spec index 726a4e6..7f4b0e5 100644 --- a/cave9.spec +++ b/cave9.spec @@ -1,6 +1,3 @@ -%global fontname mutante -%global fontconf 64-%{name}-%{fontname}.conf - %global forgeurl https://github.com/bart9h/cave9 Name: cave9 @@ -9,49 +6,48 @@ Release: %autorelease -n Summary: 3d game of cave exploration %global tag %{version} %forgemeta -License: LGPL-3.0-only AND CC-BY-SA-2.5 AND CC-BY-SA-3.0 AND LicenseRef-Fedora-Public-Domain +License: LGPL-3.0-only AND CC-BY-SA-3.0 AND LicenseRef-Fedora-Public-Domain URL: %{forgeurl} Source0: %{forgesource} Source1: http://cave9.googlecode.com/files/cave9_data-4.tgz Source2: cave9.desktop +Source3: 64-%{name}-%{fontname}.conf Source4: %{fontname}.metainfo.xml BuildRequires: gcc BuildRequires: SDL_image-devel, SDL_net-devel, SDL_ttf-devel, mesa-libGL-devel, desktop-file-utils, fontpackages-devel BuildRequires: make +Requires: fontpackages-filesystem Requires: cave9-%{fontname}-fonts %description Cave9 is a gravity cave-exploration game. -%package %{fontname}-fonts - -Summary: Mutante font used by the HUD in cave9 game -BuildArch: noarch -License: CC-BY-SA-2.5 -Requires: fontpackages-filesystem -Source3: %{name}-%{fontname}-fontconfig.conf - -%description %{fontname}-fonts -Fantasy/display font used by the cave9 game, this font has only the basic -characters used in the Portuguese language was made as an experiment by the -designer Jonas Kühner (http://www.criatipos.com/) the font was altered by -the game developer to also include numbers. - - -%_font_pkg -n %{fontname} -f %{fontconf} %{fontname}.ttf -%doc data_README.txt -%{_datadir}/appdata/%{fontname}.metainfo.xml +%global fontname mutante +%global fontlicense CC-BY-2.5 +%global fontfamily mutante +%global fontsummary Mutante font used by the HUD in cave9 game +%global fonts data/*.ttf +%global fontconf 64-%{name}-%{fontname}.conf +%global fontconfs %{SOURCE3} %{SOURCE4} +%global fontdescription %{expand: +Fantasy/display font used by the cave9 game, this font has only the +basic characters used in the Portuguese language was made as an +experiment by the designer Jonas Kühner (http://www.criatipos.com/) the +font was altered by the game developer to also include numbers.} +%fontmetapkg -n %{name}-%{fontname}-fonts %prep %setup -q -a1 sed -i src/GNUmakefile -e "s/-Wall -Werror -ggdb//" +mv data/hud.ttf data/mutante.ttf %build CFLAGS="%{optflags}" make %{?_smp_mflags} +%fontbuild %install @@ -62,18 +58,9 @@ cp -p data/wall.jpg data/icon.png data/thrust.wav data/crash.wav data/hit.wav $R mkdir -p %{buildroot}/usr/share/pixmaps cp -p data/icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/cave9.png -install -m 0755 -d %{buildroot}%{_fontdir} -install -m 0644 -p data/*.ttf %{buildroot}%{_fontdir}/mutante.ttf - -install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \ - %{buildroot}%{_fontconfig_confdir} +%fontinstall +ln -s ../../..%{_datadir}/fonts/%{fontname}-fonts/mutante.ttf $RPM_BUILD_ROOT/usr/share/cave9/hud.ttf -install -m 0644 -p %{SOURCE3} \ - %{buildroot}%{_fontconfig_templatedir}/%{fontconf} -ln -s %{_fontconfig_templatedir}/%{fontconf} \ - %{buildroot}%{_fontconfig_confdir}/%{fontconf} - -ln -s ../../..%{_fontdir}/mutante.ttf $RPM_BUILD_ROOT/usr/share/cave9/hud.ttf # Register as an application to be visible in the software center # @@ -116,8 +103,13 @@ mv data/README.txt data_README.txt desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2} +%check +%fontcheck + + %files -%doc AUTHORS.txt README.txt COPYING.txt data_README.txt +%doc AUTHORS.txt README.txt +%license COPYING.txt data_README.txt %{_bindir}/cave9 %{_datadir}/cave9 %{_datadir}/pixmaps/cave9.png @@ -125,5 +117,10 @@ desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2} %{_datadir}/applications/cave9.desktop +%files -n %{name}-%{fontname}-fonts -f %{fontfilelist} +%{_datadir}/appdata/%{fontname}.metainfo.xml +%license data_README.txt + + %changelog %autochangelog diff --git a/mutante.metainfo.xml b/mutante.metainfo.xml index f8cae8b..59412bf 100644 --- a/mutante.metainfo.xml +++ b/mutante.metainfo.xml @@ -2,7 +2,7 @@ mutante - CC-BY-3.0 + CC-BY-2.5 MutantE Mutante font used by the HUD in cave9 game