Name: escape
Version: 200912250
Release: 3%{?dist}
Summary: Extensible block-pushing puzzle game
Group: Amusements/Games
License: GPLv3
URL: http://escape.spacebar.org/
Source0: http://escape.spacebar.org/source/%{name}-src-%{version}.tar.bz2
Source1: %{name}.desktop
Patch0: escape-200912250-update-remove.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel SDL_image-devel SDL_net-devel
BuildRequires: pkgconfig desktop-file-utils
Requires: hicolor-icon-theme
%description
Escape is a tile-based puzzle game in the style of "Adventures of
Lolo" or "Chip's Challenge." Unlike either of those games, Escape
doesn't rely at all on reflexes--it's all about your brain.
Although Escape comes with hundreds of levels, the game places an
emphasis on the composition of new puzzles. Thus Escape has a
built-in level editor and facilities for automatically sharing
puzzles with other players.
%prep
%setup -q -n %{name}-src
# fix update bug
%patch0 -p1 -b .update-remove
# fix permissions for debuginfo packages
find . \( -name '*.h' -o -name '*.cpp' \) -type f -print0 | xargs -0 chmod 0644
%build
make LINUX=1 \
LDFLAGS="" \
LDLIBS="`pkg-config --libs sdl` -lSDL_image -lSDL_net" \
CXXFLAGS="`pkg-config --cflags sdl` $RPM_OPT_FLAGS" \
CPPFLAGS="-DMULTIUSER -DDATADIR=\\\"%{_datadir}/%{name}/data/\\\" -DSTARTUP_LEVELS=\\\"%{_datadir}/%{name}/levels/\\\" -DNOSOUND" \
%{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
install -D -m0755 -p escape.exe \
$RPM_BUILD_ROOT%{_bindir}/escape
# graphics
mkdir -p $RPM_BUILD_ROOT%{_datadir}/escape/data
install -D -m0644 -p -t $RPM_BUILD_ROOT%{_datadir}/escape/data *.png
# levels
mkdir -p $RPM_BUILD_ROOT%{_datadir}/escape/levels
cp -a official triage mylevels $RPM_BUILD_ROOT%{_datadir}/escape/levels
find $RPM_BUILD_ROOT%{_datadir}/escape/levels -type f -print0 | xargs -0 chmod 0644
find $RPM_BUILD_ROOT%{_datadir}/escape/levels -type d -name CVS -print0 | xargs -0 rm -rf
# icon
install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
cp -a icon.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
# desktop file
desktop-file-install --vendor fedora \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
%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
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING design.txt escape.txt README
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/applications/*.desktop
%changelog
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Jan 16 2010 Adam Goode <adam@spicenitz.org> - 200912250-1
- New upstream release
+ Two years of adjustments and bugfixes
+ New transporter animations
+ GPLv3
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200704130-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Feb 24 2009 Adam Goode <adam@spicenitz.org> - 200704130-12
- Fix for GCC 4.4
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200704130-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sun Jan 4 2009 Adam Goode <adam@spicenitz.org> - 200704130-10
- Correct post and postun scripts for icon cache
* Sat Aug 30 2008 Adam Goode <adam@spicenitz.org> - 200704130-9
- RPM 4.6 fix for patch tag
* Sun Feb 3 2008 Adam Goode <adam@spicenitz.org> - 200704130-8
- GCC 4.3 fix
* Wed Dec 5 2007 Adam Goode <adam@spicenitz.org> - 200704130-7
- Fix desktop file validation
* Fri Oct 12 2007 Adam Goode <adam@spicenitz.org> - 200704130-6
- Fix update problem with symlinks
* Tue Aug 21 2007 Adam Goode <adam@spicenitz.org> - 200704130-5
- Rebuild
* Sat Aug 11 2007 Adam Goode <adam@spicenitz.org> - 200704130-4
- Licensing update
* Tue Apr 17 2007 Adam Goode <adam@spicenitz.org> - 200704130-3
- REALLY fix spurious-executable-perm
* Mon Apr 16 2007 Adam Goode <adam@spicenitz.org> - 200704130-2
- Fix permissions in debuginfo package
- Generate SRPM with source matching upstream MD5
* Fri Apr 13 2007 Adam Goode <adam@spicenitz.org> - 200704130-1
- Merge -data package into this
- Install icon into correct place and update the icon cache
- Use upstream tarball, created by upstream at my request
- Remove X-Fedora category
* Sat Apr 7 2007 Adam Goode <adam@spicenitz.org> - 200704070-1
- Initial packaging