Blob Blame History Raw
Name:           cave9
Version:        0.3
Release:        3%{?dist}
Summary:        3d game of cave exploration

Group:          Amusements/Games
License:        LGPLv3 and CC-BY and CC-BY-SA and Public Domain
URL:            http://code.google.com/p/cave9
Source0:        http://cave9.googlecode.com/files/cave9_src-%{version}.tgz
Source1:        http://cave9.googlecode.com/files/cave9_data-4.tgz
Source2:        cave9.desktop
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  SDL_image-devel, SDL_net-devel, SDL_ttf-devel, mesa-libGL-devel, desktop-file-utils

%description
Cave9 is a gravity cave-exploration game.

%prep
%setup -q -a1
sed -i src/GNUmakefile -e "s/-Wall -Werror -ggdb//"

%build
CFLAGS="%{optflags}" make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/share/cave9
install -m 755 -p cave9 $RPM_BUILD_ROOT/usr/bin 
cp -p data/wall.jpg data/icon.png data/thrust.wav data/crash.wav data/hit.wav data/hud.ttf $RPM_BUILD_ROOT/usr/share/cave9
mv data/README.txt data_README.txt
desktop-file-install --vendor="fedora"                    \
  --dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
  %{SOURCE2}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS.txt README.txt COPYING.txt data_README.txt
%{_bindir}/cave9
%{_datadir}/cave9
%{_datadir}/applications/fedora-cave9.desktop

%changelog
* Sun Nov 09 2008 Victor Bogado <victor@bogado.net> 0.3-3
- Use install -m 755 to ensure correct mode for binaries.
- Final dot missing on description.
- Missing "Public Domain" for nasa data files.

* Fri Nov 07 2008 Victor Bogado <victor@bogado.net> 0.3-2
- better description
- use of macros
- BuildRequires was missing 'desktop-file-utils'
- Flag to preserve timestamps on 'cp'

* Mon Sep 15 2008 Victor Bogado <victor@bogado.net> 0.3-1
- update version and data file.
- new data file is now compleatly free.

* Sat Apr 19 2008 Victor Bogado <victor@bogado.net> 0.2-2
- Use the compiler flags from fedora

* Wed Apr 16 2008 Victor Bogado <victor@bogado.net> 0.2-1
- initial spec