Name: abe
Version: 1.0
Release: 3
Summary: Scrolling, platform-jumping, ancient pyramid exploring game
Group: Amusements/Games
License: GPL
URL: http://abe.sourceforge.net/
Source0: http://download.sourceforge.net/abe/abe-1_0.tar.gz
Source1: %{name}.png
Patch0: %{name}-%{version}-datapath.patch
Patch1: %{name}-%{version}-tmppath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel >= 1.2.3, SDL_mixer-devel >= 1.2.3
BuildRequires: desktop-file-utils
%description
A scrolling, platform-jumping, key-collecting, ancient pyramid exploring game,
vaguely in the style of similar games for the Commodore+4.
%prep
%setup -q -n %{name}-1_0
# Abe assumes it runs from its build directory and thus assumes everything
# is writable there etc.. ugh:
# Hardcode /usr/share/abe/ paths
%patch0 -p1 -b .datapath
# Write temporary image files into home directory, not data directory
%patch1 -p1 -b .tmppath
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pixmaps/
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp -p -r images maps sounds $RPM_BUILD_ROOT/%{_datadir}/%{name}
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/pixmaps/
install -p -m 755 %{name} $RPM_BUILD_ROOT/%{_bindir}/
cat << EOF > %{name}.desktop
[Desktop Entry]
Name=Abe
Comment="Abe's Amazing Adventure"
Exec=abe
Icon=abe.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Game;Application;X-Fedora;
EOF
desktop-file-install --vendor fedora --dir $RPM_BUILD_ROOT/%{_datadir}/applications/ %{name}.desktop
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING README
%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%changelog
* Wed Aug 13 2003 Panu Matilainen <pmatilai@welho.com> 0:1.0-0.fdr.3
- doh.. remember to update the icon to png in desktop file too
* Fri Aug 08 2003 Panu Matilainen <pmatilai@welho.com> 0:1.0-0.fdr.2
- fix QA issues in #555
* Sun Aug 03 2003 Panu Matilainen <pmatilai@welho.com> 0:1.0-0.fdr.1
- Initial Fedora packaging.