diff --git a/twind.changes b/twind.changes index 97bfb40..4693dac 100644 --- a/twind.changes +++ b/twind.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sun Jun 21 15:20:25 UTC 2015 - nemysis@gmx.ch + +- Fix Usage, Unable to load data +- Add twind.sh, that game works from home +- Change Desktop entry file +- Add description for patch +- Use for patch twind-1.1.0 instead of twind-%{version} +- Add BuildRequires for hicolor-icon-theme +- Change Description +- Change sed, use %{_libexecdir}/%{name} instead of share/twind +- Simplify installation handling, use normal build +- Fix build with gcc5, add -fgnu89-inline + ------------------------------------------------------------------- Mon Dec 8 22:08:24 UTC 2014 - nemysis@gmx.ch diff --git a/twind.desktop b/twind.desktop index d42e792..a1ba070 100644 --- a/twind.desktop +++ b/twind.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Twin Distress -GenericName=Arcade Game +GenericName=Twin Distress Comment=Match and remove all of the blocks before time runs out Icon=twind Exec=twind diff --git a/twind.sh b/twind.sh new file mode 100644 index 0000000..8a7af02 --- /dev/null +++ b/twind.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +GAME_LOCAL_DIR=$HOME/.twind +GAME_DATA_DIR=/usr/lib/twind +GAME_EXECUTABLE=/usr/lib/twind/twind + +mkdir -p $GAME_LOCAL_DIR +cd $GAME_LOCAL_DIR + +for dir in graphics music sound ; do + ln -snf $GAME_DATA_DIR/$dir $dir +done + +exec $GAME_EXECUTABLE "${@}" diff --git a/twind.spec b/twind.spec index 6c2c14e..8eee47b 100644 --- a/twind.spec +++ b/twind.spec @@ -1,7 +1,7 @@ # # spec file for package twind # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,11 +24,13 @@ License: GPL-2.0 Group: Amusements/Games/Arcade/LogicGame Url: http://twind.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{version}/%{name}-%{version}.tar.gz -Source1: %{name}.desktop -# Correct bad code -Patch0: %{name}-%{version}.twind.c.patch +Source1: %{name}.sh +Source2: %{name}.desktop +# PATCH-FIX-OPENSUSE - twind-1.1.0.twind.c.patch -- Correct bad code +Patch0: %{name}-1.1.0.twind.c.patch %if 0%{?suse_version} BuildRequires: fdupes +BuildRequires: hicolor-icon-theme BuildRequires: update-desktop-files %endif BuildRequires: pkgconfig(SDL_image) @@ -43,30 +45,45 @@ and must be of the same color. After completing a level, you will be rewarded with a bonus point for every tick left on the clock. For each level thereafter, the time to complete the the level will be shorter. +Shortcut Keys Used During the Game + + b - change the block set + c - change the corner style of the blocks + f, F4 - toggle between full screen/window mode (can be used anywhere) + h, F1 - display the help screen + m - turn background music on/off (can be used anywhere) + n, F2 - start a new game (highscores won't be saved ending a game this way) + p, Pause, F3 - pause/unpause the game + q, Esc - quit the game + s - turn sound effects on/off (can be used anywhere) + 0 - 9 - toggle the L & R colors on Insane mode (can be used anywhere) + %prep %setup -q %patch0 -# Correct Path and Highscore -sed -i -e 's|chown |true |g' \ - -e 's|local/share/games/twind|share/twind|' \ - -e 's|/var/lib/games/twind/|%{_localstatedir}/games/twindistress/|' \ - Makefile +# SED-FIX-OPENSUSE -- Correct Path and Highscore +sed -i -e 's|chown |true |; + s|/usr/local/bin|${DESTDIR}%{_libexecdir}/%{name}|; + s|/usr/local/share/games/%{name}|${DESTDIR}%{_libexecdir}/%{name}|; + s|HIGH_SCORE_PREFIX =|#HIGH_SCORE_PREFIX =|; + s|mkdir -p $(HIGH_SCORE_PREFIX)||' Makefile %build -make %{?_smp_mflags} CFLAGS="%{optflags}" +make %{?_smp_mflags} CFLAGS="%{optflags} -fgnu89-inline" %install mkdir -p %{buildroot}%{_bindir} -make install BIN_PREFIX=%{buildroot}%{_bindir}/ \ - DATA_PREFIX=%{buildroot}%{_datadir}/%{name}/ \ - HIGH_SCORE_PREFIX=%{buildroot}%{_localstatedir}/games/twindistress/ +%make_install + +# install wrapper +install -Dm 0755 %{S:1} %{buildroot}%{_bindir}/%{name} # install icon install -Dm 0644 graphics/%{name}.png %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/%{name}.png # install Desktop file -install -Dm 0644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop +install -Dm 0644 %{S:2} %{buildroot}%{_datadir}/applications/%{name}.desktop %if 0%{?suse_version} %suse_update_desktop_file %{name} @@ -76,12 +93,10 @@ install -Dm 0644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop %files %defattr(-,root,root,-) %doc AUTHORS COPYING CREDITS ChangeLog NEWS README -%attr(0755,root,games) %{_bindir}/%{name} +%{_bindir}/%{name} +%attr(0755,root,games) %{_libexecdir}/%{name}/%{name} %{_datadir}/applications/%{name}.desktop -%{_datadir}/icons/hicolor/ -%{_datadir}/%{name} -%attr(0775,root,games) %{_localstatedir}/games/twindistress -# Correct Permissions -%attr(0664,root,games) %{_localstatedir}/games/twindistress/* +%{_datadir}/icons/hicolor +%{_libexecdir}/%{name} %changelog