Blob Blame History Raw
Name:           asylum
Version:        0.3.2
Release:        2%{?dist}
Summary:        SDL port of the game Asylum, originally for the Archimedes
Group:          Amusements/Games
# For detailed licensing, see the README
License:        GPLv3 and Public Domain
URL:            http://sdl-asylum.sourceforge.net
Source0:        http://downloads.sourceforge.net/sdl-%{name}/%{name}-%{version}.tar.gz
Source1:        %{name}.png

BuildRequires:  desktop-file-utils
BuildRequires:  SDL_mixer-devel
Requires:       hicolor-icon-theme

%description
SDL Asylum is a C port of the computer game Asylum, which was written by Andy
Southgate in 1994 for the Acorn Archimedes and is now public domain. The object
is to find things that look like brain cells and shut them down! The game
revolves around shooting anything which moves, collecting anything which
doesn't move and most importantly, finding your way to each of the eight
pulsating neurons scattered through the immense map.


%prep
%setup -q

# Character encoding fixes
iconv -f iso8859-1 README -t utf8 > README.conv \
    && /bin/mv -f README.conv README

# Delete bundled binary to make absolutely sure we get a new one.
rm -f %{name}


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

# Build desktop icon
cat >%{name}.desktop <<EOF
[Desktop Entry]
Name=Asylum
GenericName=Platform Game
Comment=%{summary}
Exec=%{name}
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=false
Categories=Game;ActionGame;
EOF


%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_var}/games/%{name}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
touch %{buildroot}%{_var}/games/%{name}/{EgoHighScores,PsycheHighScores,IdHighScores,ExtendedHighScores}

install -m0755 %{name} %{buildroot}%{_bindir}
cp -a data/* %{buildroot}%{_datadir}/%{name}

install -m0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
desktop-file-install --vendor fedora \
                     --dir %{buildroot}%{_datadir}/applications \
                     %{name}.desktop


%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
# Note the game is SETGID games for the hi-scores.
%defattr(-,root,root,-)
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%attr(0775,root,games) %dir %{_var}/games/%{name}
%attr(2755,root,games) %{_bindir}/%{name}
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%doc Instruct README COPYING
%ghost %{_var}/games/%{name}/EgoHighScores
%ghost %{_var}/games/%{name}/PsycheHighScores
%ghost %{_var}/games/%{name}/IdHighScores
%ghost %{_var}/games/%{name}/ExtendedHighScores


%changelog
* Fri May  4 2012 Ville Skyttä <ville.skytta@iki.fi> - 0.3.2-2
- Build with RPM_OPT_FLAGS and RPM_LD_FLAGS.
- Fix desktop entry warnings.

* Fri Apr 27 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 0.3.2-1
- Update 0.3.2 - Fix FTBFS, drop not needed patch

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

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

* Fri Jun 12 2009 Michael Fleming <mfleming+rpm@thatfleminggent.com> - 0.3.0-1
- Update to 0.3.0

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

* Fri Sep 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.2.4-3
- fix makefile patch to apply properly

* Fri Aug 29 2008 Michael Fleming <mfleming+rpm@enlartenment.com> - 0.2.4-2
- New builders don't like Patch0 declaration, adjust make it happy

* Fri Aug 29 2008 Michael Fleming <mfleming+rpm@enlartenment.com> - 0.2.4-1
- Upgrade to 0.2.4

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.2.3-3
- Autorebuild for GCC 4.3

* Tue Nov 27 2007 Ian Chapman <packages[AT]amiga-hardware.com> 0.2.3-2
- Enable ppc/ppc64 build. Endian issues seem resolved (BZ 319541)

* Sun Nov 25 2007 Ian Chapman <packages[AT]amiga-hardware.com> 0.2.3-1
- Upgrade to 0.2.3
- Removed asylum-0.2.2-fixsound.patch - fixed upstream

* Fri Oct 05 2007 Ian Chapman <packages[AT]amiga-hardware.com> 0.2.2-2
- Release bump

* Sun Sep 09 2007 Ian Chapman <packages[AT]amiga-hardware.com> 0.2.2-1
- Initial release