Blob Blame History Raw
Name:           raidem
Version:        0.3.1
Release:        1%{?dist}
Summary:        2d top-down shoot'em up
Group:          Amusements/Games
License:        zlib License
URL:            http://home.exetel.com.au/tjaden/raidem/
# This is an exacy copy of the upstream src except that lib/almp3 which is
# an included mp3 decoder has been removed.
Source0:        %{name}-%{version}-src.zip
Source1:        raidem.png
Source2:        raidem.desktop
Patch0:         raidem-0.3.1-syslibs.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  gcc-objc glyph-keeper-devel freetype-devel adime-devel
BuildRequires:  zziplib-devel libpng-devel libid3tag-devel AllegroOGG-devel
BuildRequires:  automake desktop-file-utils

%description
Raid'em is a 2d top-down shoot'em up. It began as a remake of Raid II
(abandoned long ago), which was inspired by Raptor, but has turned out very
differently. Features: Neat looking graphics, LOTS of explosions and scrap
metal, Eye candy a-plenty, Many different powerups, A desert. And a space
platform. And some snow, 2 player mode, Demo recording and playback, Loads of
fun.


%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p1 -z .syslibs
# remove all included system libs, to avoid using the included system headers.
mv lib/loadpng .
rm -fr lib/*
mv loadpng lib
aclocal
autoconf


%build
# override _datadir otherwise it expects its datafile directly under /use/share
%define _datadir /usr/share/%{name}
%configure
%define _datadir /use/share
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
# DIY, since the Makefile uses hardcoded ( := assigned) paths and install -s
# and install -g games, etc. Fixable but this is easier
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -a data demos maps $RPM_BUILD_ROOT%{_datadir}/%{name}

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{SOURCE2}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
install -p -m 644 %{SOURCE1} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc ChangeLog docs/LICENCE.txt docs/README.txt docs/damages.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png


%changelog
* Sat Apr 29 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3.1-1
- New upstream release 0.3.1
- Upstream has merged most patches, dropped.
- Upstream has added ogg support (yeah!), add ogg and id3tag support.

* Sun Apr  2 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3-2
- Add missing RPM_OPT_FLAGS to CFLAGS
- Add missing -D__LINUX__ to CFLAGS with this patch2 is no longer needed
- Add -fsigned-char to CFLAGS this fixes crashing on startup on PPC (bz 185850)
- Add Patch3 which fixes funky colors on PPC (bz 185850)

* Sat Mar 12 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3-1
- Initial Fedora Extras package