Blob Blame History Raw
Name:		escape
Version:	200912250
Release:	18%{?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


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 \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
	%{SOURCE1}

# Register as an application to be visible in the software center
#
# NOTE: It would be *awesome* if this file was maintained by the upstream
# project, translated and installed into the right place during `make install`.
#
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
<!--
EmailAddress: tom7@cs.cmu.edu
SentUpstream: 2014-09-24
-->
<application>
  <id type="desktop">escape.desktop</id>
  <metadata_license>CC0-1.0</metadata_license>
  <summary>solve the puzzle to find the exit and escape</summary>
  <description>
    <p>
      Escape is a puzzle game that relies less on reflexes and more on
      solving the puzzle.
      The player has to move blocks and detonate bombs and other devices in a
      certain sequence to be able to solve the puzzle, and escape the maze.
      It features many levels of varying difficulty.
    </p>
  </description>
  <url type="homepage">http://escape.spacebar.org/</url>
  <screenshots>
    <screenshot type="default">http://escape.spacebar.org/images/california-roll-screenshot.png</screenshot>
    <screenshot>http://escape.spacebar.org/images/buttonblocker-screenshot.png</screenshot>
    <screenshot>http://escape.spacebar.org/images/mainmenu-screenshot.png</screenshot>
  </screenshots>
</application>
EOF


%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}/appdata/*.appdata.xml
%{_datadir}/applications/*.desktop


%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 200912250-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 200912250-17
- Remove obsolete scriptlets

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 200912250-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 200912250-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 200912250-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 200912250-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 200912250-11
- Rebuilt for GCC 5 C++11 ABI change

* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 200912250-10
- Add an AppData file for the software center

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Mar 08 2013 Jon Ciesla <limburgher@gmail.com> - 200912250-6
- Drop desktop vendor tag.

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 200912250-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* 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