Blob Blame History Raw
Name:           abe
Version:        1.1
Release:        12%{?dist}

Summary:        Scrolling, platform-jumping, ancient pyramid exploring game
Group:          Amusements/Games
License:        GPL+
URL:            http://abe.sourceforge.net/
Source0:        http://downloads.sourceforge.net/abe/abe-%{version}.tar.gz
Source1:        %{name}.png
Patch0:         abe-1.1-settings.patch
Patch1:         abe-1.1-doublefree.patch
Patch2:         abe-1.1-format.patch

BuildRequires:  SDL-devel >= 1.2.3, SDL_mixer-devel >= 1.2.3
BuildRequires:  libXmu-devel libXi-devel
BuildRequires:  desktop-file-utils
Requires(post): desktop-file-utils
Requires(postun): 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
%patch0 -p1
%patch1
%patch2

%build
%configure --with-data-dir=%{_datadir}/%{name}
sed -i "s/^CFLAGS =.*/CFLAGS = ${RPM_OPT_FLAGS} \$\(SDL_CFLAGS\)/" src/Makefile
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

# make install does not copy the game data files.
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pixmaps/
cp -p -r images maps sounds $RPM_BUILD_ROOT/%{_datadir}/%{name}
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/pixmaps/

cat << EOF > %{name}.desktop
[Desktop Entry]
Name=Abe
Comment="Abe's Amazing Adventure"
Exec=abe
Icon=abe
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Game;ArcadeGame;
EOF

desktop-file-install --vendor fedora --dir $RPM_BUILD_ROOT/%{_datadir}/applications/ %{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%post
update-desktop-database %{_datadir}/applications &>/dev/null

%postun
if [ $1 -eq 0 ]; then
    update-desktop-database %{_datadir}/applications &>/dev/null
fi

%files
%defattr(-,root,root,-)
%doc COPYING README
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
* Mon Mar 14 2011 Jerry James <loganjerry@gmail.com> - 1.1-12
- Fix double free (bz 509052)
- Fix incorrectly-sized format specifier
- Don't use abe's extra optimization and debugging CFLAGS (fixes debuginfo)
- Remove filename extension from Icon field in desktop file
- Remove BuildRoot tag
- Add post/postun scripts, fix Requires for those scripts

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Dec 19 2008 Wart <wart@kobold.org> - 1.1-9
- Add coreutils requirement for rpm post scripts

* Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.1-8
- Fix Patch0:/%%patch mismatch.

* Fri Feb 8 2008 Wart <wart@kobold.org> 1.1-7
- Rebuild for gcc 4.3

* Wed Aug 15 2007 Wart <wart@kobold.org> 1.1-6
- License tag clarification
- Simplify %%file section

* Fri Jun 1 2007 Wart <wart@kobold.org> 1.1-5
- Update desktop category for better game menu integration
- Use improved download URL.

* Thu Aug 31 2006 Wart <wart@kobold.org> 1.1-4
- Add missing BuildRequires

* Thu Aug 31 2006 Wart <wart@kobold.org> 1.1-3
- Rebuild for Fedora Extras

* Sun Apr 2 2006 Wart <wart@kobold.org> 1.1-2
- Enable changing the video settings (BZ #187589)

* Sat Mar 4 2006 Wart <wart@kobold.org> 1.1-1
- Update to 1.1

* Sat Mar 4 2006 Wart <wart@kobold.org> 1.0-6
- rebuild for FC5

* Mon Apr 11 2005 Panu Matilainen <pmatilai@welho.com> 0:1.0-5
- fix build on gcc4
- patch to fix issues in #149362

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* 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.