284c444
%global fontname mutante
284c444
%global fontconf 64-%{name}-%{fontname}.conf
83df289
32cb2ca
Name:           cave9
Victor Bogado f1768b1
Version:        0.4
e7b57ca
Release:        18%{?dist}
32cb2ca
Summary:        3d game of cave exploration
32cb2ca
32cb2ca
Group:          Amusements/Games
83df289
License:        LGPLv3 and CC-BY-SA and Public Domain
32cb2ca
URL:            http://code.google.com/p/cave9
32cb2ca
Source0:        http://cave9.googlecode.com/files/cave9_src-%{version}.tgz
32cb2ca
Source1:        http://cave9.googlecode.com/files/cave9_data-4.tgz
32cb2ca
Source2:        cave9.desktop
284c444
Source4:        %{fontname}.metainfo.xml
32cb2ca
83df289
BuildRequires:  SDL_image-devel, SDL_net-devel, SDL_ttf-devel, mesa-libGL-devel, desktop-file-utils, fontpackages-devel
284c444
Requires:       cave9-%{fontname}-fonts
83df289
32cb2ca
32cb2ca
%description
32cb2ca
Cave9 is a gravity cave-exploration game.
32cb2ca
284c444
%package        %{fontname}-fonts
83df289
Victor Bogado 267144d
Summary:        Mutante font used by the HUD in cave9 game
83df289
BuildArch:      noarch
83df289
Group:          User Interface/X
83df289
License:        CC-BY
83df289
Requires:       fontpackages-filesystem
284c444
Source3:        %{name}-%{fontname}-fontconfig.conf
83df289
284c444
%description %{fontname}-fonts
83df289
Fantasy/display font used by the cave9 game, this font has only the basic
Victor Bogado 267144d
characters used in the Portuguese language was made as an experiment by the
83df289
designer Jonas K├╝hner (http://www.criatipos.com/) the font was altered by
83df289
the game developer to also include numbers.
83df289
284c444
%_font_pkg -n %{fontname} -f %{fontconf} %{fontname}.ttf
83df289
%doc data_README.txt
284c444
%{_datadir}/appdata/%{fontname}.metainfo.xml
83df289
32cb2ca
%prep
32cb2ca
%setup -q -a1
32cb2ca
sed -i src/GNUmakefile -e "s/-Wall -Werror -ggdb//"
32cb2ca
32cb2ca
%build
32cb2ca
CFLAGS="%{optflags}" make %{?_smp_mflags}
32cb2ca
32cb2ca
%install
83df289
mkdir -p %{buildroot}/usr/bin %{buildroot}/usr/share/cave9
32cb2ca
install -m 755 -p cave9 $RPM_BUILD_ROOT/usr/bin 
83df289
cp -p data/wall.jpg data/icon.png data/thrust.wav data/crash.wav data/hit.wav $RPM_BUILD_ROOT/usr/share/cave9
83df289
Richard Hughes 34a6215
mkdir -p %{buildroot}/usr/share/pixmaps
Richard Hughes 34a6215
cp -p data/icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/cave9.png
Richard Hughes 34a6215
83df289
install -m 0755 -d %{buildroot}%{_fontdir}
83df289
install -m 0644 -p data/*.ttf %{buildroot}%{_fontdir}/mutante.ttf
83df289
83df289
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
83df289
                   %{buildroot}%{_fontconfig_confdir}
83df289
83df289
install -m 0644 -p %{SOURCE3} \
83df289
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
83df289
ln -s %{_fontconfig_templatedir}/%{fontconf} \
83df289
      %{buildroot}%{_fontconfig_confdir}/%{fontconf}
83df289
83df289
ln -s ../../..%{_fontdir}/mutante.ttf $RPM_BUILD_ROOT/usr/share/cave9/hud.ttf
83df289
Richard Hughes fe34989
# Register as an application to be visible in the software center
Richard Hughes fe34989
#
Richard Hughes fe34989
# NOTE: It would be *awesome* if this file was maintained by the upstream
Richard Hughes fe34989
# project, translated and installed into the right place during `make install`.
Richard Hughes fe34989
#
Richard Hughes fe34989
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
Richard Hughes fe34989
#
Richard Hughes fe34989
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
Richard Hughes fe34989
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <
Richard Hughes fe34989
Richard Hughes fe34989
Richard Hughes fe34989
Richard Hughes fe34989
BugReportURL: https://code.google.com/p/cave9/issues/detail?id=38
Richard Hughes fe34989
SentUpstream: 2014-09-24
Richard Hughes fe34989
-->
Richard Hughes fe34989
<application>
Richard Hughes fe34989
  <id type="desktop">cave9.desktop</id>
Richard Hughes fe34989
  <metadata_license>CC0-1.0</metadata_license>
Richard Hughes fe34989
  <summary>A cave exploration game featuring unique controls based on gravity</summary>
Richard Hughes fe34989
  <description>
Richard Hughes fe34989
    

Richard Hughes fe34989
      cave9 is 3D cave exploration game based on the SF-cave game.
Richard Hughes fe34989
      You control a jet that maneuvers through a series of caves and the objective
Richard Hughes fe34989
      of the game is to avoid colliding with the cave walls.
Richard Hughes fe34989
    

Richard Hughes fe34989
  </description>
Richard Hughes fe34989
  <url type="homepage">http://code.google.com/p/cave9</url>
Richard Hughes fe34989
  <screenshots>
Richard Hughes fe34989
    <screenshot type="default">http://cave9.googlecode.com/files/cave9-small.jpg</screenshot>
Richard Hughes fe34989
  </screenshots>
Richard Hughes fe34989
</application>
Richard Hughes fe34989
EOF
Richard Hughes fe34989
284c444
# Add AppStream metadata
284c444
install -Dm 0644 -p %{SOURCE4} \
284c444
        %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml
284c444
32cb2ca
mv data/README.txt data_README.txt
f0ab415
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications  %{SOURCE2}
32cb2ca
32cb2ca
%files
32cb2ca
%doc AUTHORS.txt README.txt COPYING.txt data_README.txt
32cb2ca
%{_bindir}/cave9
32cb2ca
%{_datadir}/cave9
Richard Hughes 34a6215
%{_datadir}/pixmaps/cave9.png
Richard Hughes fe34989
%{_datadir}/appdata/%{name}.appdata.xml
f0ab415
%{_datadir}/applications/cave9.desktop
32cb2ca
32cb2ca
%changelog
e7b57ca
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-18
e7b57ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e7b57ca
a881feb
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-17
a881feb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a881feb
7fe212b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-16
7fe212b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7fe212b
d816615
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-15
d816615
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d816615
77df58b
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-14
77df58b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
77df58b
4bb4bd4
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-13
4bb4bd4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4bb4bd4
Richard Hughes fe34989
* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 0.4-12
Richard Hughes fe34989
- Add an AppData file for the software center
Richard Hughes fe34989
284c444
* Tue Nov 18 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.4-11
284c444
- Add metainfo file to show mutante font in gnome-software
284c444
- Added fontname macro
284c444
b0b3aa5
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-10
b0b3aa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b0b3aa5
Richard Hughes 34a6215
* Wed Jul 16 2014 Richard Hughes <richard@hughsie.com> - 0.4-9
Richard Hughes 34a6215
- Install the application icon in a standard location to fix display in
Richard Hughes 34a6215
  gnome-software and Apper.
Richard Hughes 34a6215
e5e2633
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-8
e5e2633
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e5e2633
8a7e6a8
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-7
8a7e6a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8a7e6a8
f0ab415
* Thu Feb 14 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 0.4-6
f0ab415
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
f0ab415
6b0f00f
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-5
6b0f00f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6b0f00f
c921fd9
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-4
c921fd9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c921fd9
1216e3d
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-3
1216e3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1216e3d
213cded
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
213cded
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
213cded
Victor Bogado ff1746b
* Wed Aug 04 2010 Victor Bogado da Silva Lins <victor@bogado.net> 0.4-1
Victor Bogado ff1746b
- new upstream release
Victor Bogado ff1746b
453edfa
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-9
453edfa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
453edfa
83df289
* Wed Jun 24 2009 Victor Bogado <victor@bogado.net> 0.3-8
83df289
- removed the redundant ownership of the fontdir.
83df289
- lowered the priority
83df289
- Updated the font configuration to better match the suggested template.
83df289
83df289
* Tue Jun 23 2009 Victor Bogado <victor@bogado.net> 0.3-7
83df289
- following the tips from Nicolas Mailhot on bug#477371
83df289
83df289
* Mon Jun 22 2009 Victor Bogado <victor@bogado.net> 0.3-6
83df289
- adapted the font subpackge to the new template on Fedora 11
83df289
83df289
* Wed Jan 14 2009 Victor Bogado <victor@bogado.net> 0.3-5
83df289
- Added a fontconfig file.
83df289
- Renamed the font file subpackage to follow the font package naming convention.
83df289
83df289
* Tue Dec 30 2008 Victor Bogado <victor@bogado.net> 0.3-4
83df289
- Separate the font into a new package.
8e3f2f9
32cb2ca
* Sun Nov 09 2008 Victor Bogado <victor@bogado.net> 0.3-3
32cb2ca
- Use install -m 755 to ensure correct mode for binaries.
32cb2ca
- Final dot missing on description.
32cb2ca
- Missing "Public Domain" for nasa data files.
32cb2ca
32cb2ca
* Fri Nov 07 2008 Victor Bogado <victor@bogado.net> 0.3-2
32cb2ca
- better description
32cb2ca
- use of macros
32cb2ca
- BuildRequires was missing 'desktop-file-utils'
32cb2ca
- Flag to preserve timestamps on 'cp'
32cb2ca
32cb2ca
* Mon Sep 15 2008 Victor Bogado <victor@bogado.net> 0.3-1
32cb2ca
- update version and data file.
32cb2ca
- new data file is now compleatly free.
32cb2ca
32cb2ca
* Sat Apr 19 2008 Victor Bogado <victor@bogado.net> 0.2-2
32cb2ca
- Use the compiler flags from fedora
32cb2ca
32cb2ca
* Wed Apr 16 2008 Victor Bogado <victor@bogado.net> 0.2-1
32cb2ca
- initial spec