commit a3ef238f9c2a025beddbb8a618beeddd669dbbe01f22158d7fcf0560c9f52b0a Author: Matthias Mailänder Date: Sun Oct 5 12:11:01 2014 +0000 Accepting request 253999 from home:nemysis - Change %fdupes - Use %{name}.desktop instead of Desktop Entry in spec - Use %{name}-rpmlintrc instead of Patch1 - Remove not needed mkdir -p - Use pkgconfig instead of pkgconfig(sdl) - Change sed, cosmetical changes - Correct Path, Highscore and Permissions, that more users can use same Highscore with own Results - Use $CURRENT_YEAR - Remove chmod g-s and use %attr(0755,root,games) %{_bindir}/%{name} - Use %{_datadir}/%{name} instead of %{_datadir}/%{name}/* - Add descriptions for patches - Reordering BuildRequires, added pkgconfig(sdl) - Add sed, /usr/bin/twind: Operation not permitted - Simplify installation handling - Add localstatedir - Fix Desktop file and rpmlint only say no-manual-page-for-binary twind which not exist - Add twind-1.1.0.twind.c.patch in spec - Add forgotten twind-1.1.0.COPYING.patch to twind.spec - Initial package creation - Use mine first FreeBSD port games/twind for patch, new created with Quilt twind-1.1.0.twind.c.patch - Add twind-1.1.0.COPYING.patch, correct Address - Add Desktop file and icon - Use %%fdupes macro to reduce size of the package OBS-URL: https://build.opensuse.org/request/show/253999 OBS-URL: https://build.opensuse.org/package/show/games/twind?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/twind-1.1.0.tar.gz b/twind-1.1.0.tar.gz new file mode 100644 index 0000000..5bfbae9 --- /dev/null +++ b/twind-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:392a09e92862cf8a89a9b8c6f5ed7255c15c7f058a89d889c32f59ed8da73382 +size 2837845 diff --git a/twind-1.1.0.twind.c.patch b/twind-1.1.0.twind.c.patch new file mode 100644 index 0000000..e5f2e1b --- /dev/null +++ b/twind-1.1.0.twind.c.patch @@ -0,0 +1,53 @@ +Index: twind.c +=================================================================== +--- twind.c.orig 2004-07-16 03:44:50.000000000 +0200 ++++ twind.c 2014-09-08 17:04:00.111420759 +0200 +@@ -674,10 +674,10 @@ int get_input_for_menu(char *menu_items[ + if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) { + current_menu_high = (event.button.y - starty) / game.font[font].height; + /* re-assign current_menu_high if blank option */ +- if (menu_items[game.menu][current_menu_high] == "") ++ if (*menu_items[game.menu][current_menu_high] == '\0') + current_menu_high = game.last_menu_high; + if (game.last_menu_high != current_menu_high) { +- if (menu_items[game.menu][current_menu_high] != "") { ++ if (*menu_items[game.menu][current_menu_high] != '\0') { + #ifndef NOAUDIO + if (game.audio_enabled) Mix_PlayChannel(MENU_OPTION, game.sound[MENU_OPTION], 0); + #endif +@@ -697,7 +697,7 @@ int get_input_for_menu(char *menu_items[ + if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) { + current_menu_high = (event.button.y - starty) / game.font[font].height; + /* make sure the option isn't blank */ +- if (menu_items[game.menu][current_menu_high] != "") { ++ if (*menu_items[game.menu][current_menu_high] != '\0') { + #ifndef NOAUDIO + if (game.audio_enabled) Mix_PlayChannel(OPTION_CHOICE, game.sound[OPTION_CHOICE], 0); + #endif +@@ -917,7 +917,7 @@ int move_in_menu(char *menu_items[][MAX_ + #endif + current_menu_high--; + /* if option blank, go to previous */ +- while (menu_items[game.menu][current_menu_high] == "") ++ while (*menu_items[game.menu][current_menu_high] == '\0') + current_menu_high--; + /* wrap around to the bottom entry */ + if (current_menu_high == -1) +@@ -930,7 +930,7 @@ int move_in_menu(char *menu_items[][MAX_ + #endif + current_menu_high++; + /* if option blank, go to next */ +- while (menu_items[game.menu][current_menu_high] == "") ++ while (*menu_items[game.menu][current_menu_high] == '\0') + current_menu_high++; + /* wrap around to the top entry */ + if (current_menu_high == game.menu_item_cnt) +@@ -1536,7 +1536,7 @@ void play_game() { + if (level_time && game.stop_timer + game.added_time < game.best_time) + game.best_time = game.stop_timer + game.added_time; + /* subtract a set amount of time after level 11 */ +- if (game.current_level > 11) ++ if (game.current_level >= 11) + game.level_time -= 10; + else + game.level_time = times[level_time]; diff --git a/twind-rpmlintrc b/twind-rpmlintrc new file mode 100644 index 0000000..8e9b1f7 --- /dev/null +++ b/twind-rpmlintrc @@ -0,0 +1,2 @@ +# FSF Address ignore +addFilter(".*incorrect-fsf-address.*") diff --git a/twind.changes b/twind.changes new file mode 100644 index 0000000..9edb527 --- /dev/null +++ b/twind.changes @@ -0,0 +1,65 @@ +------------------------------------------------------------------- +Sun Oct 5 11:46:27 UTC 2014 - nemysis@gmx.ch + +- Change %fdupes + +------------------------------------------------------------------- +Tue Sep 30 17:22:07 UTC 2014 - nemysis@gmx.ch + +- Use %{name}.desktop instead of Desktop Entry in spec +- Use %{name}-rpmlintrc instead of Patch1 +- Remove not needed mkdir -p + +------------------------------------------------------------------- +Sat Sep 27 23:07:56 UTC 2014 - nemysis@gmx.ch + +- Use pkgconfig instead of pkgconfig(sdl) +- Change sed, cosmetical changes + +------------------------------------------------------------------- +Mon Sep 22 10:56:03 UTC 2014 - nemysis@gmx.ch + +- Correct Path, Highscore and Permissions, that more users can + use same Highscore with own Results + +------------------------------------------------------------------- +Tue Sep 16 07:36:35 UTC 2014 - nemysis@gmx.ch + +- Use $CURRENT_YEAR +- Remove chmod g-s and use %attr(0755,root,games) %{_bindir}/%{name} +- Use %{_datadir}/%{name} instead of %{_datadir}/%{name}/* + +------------------------------------------------------------------- +Fri Sep 12 12:59:26 UTC 2014 - nemysis@gmx.ch + +- Add descriptions for patches +- Reordering BuildRequires, added pkgconfig(sdl) +- Add sed, /usr/bin/twind: Operation not permitted +- Simplify installation handling +- Add localstatedir + +------------------------------------------------------------------- +Mon Sep 8 16:10:47 UTC 2014 - nemysis@gmx.ch + +- Fix Desktop file and rpmlint only say + no-manual-page-for-binary twind which not exist + +------------------------------------------------------------------- +Mon Sep 8 16:03:10 UTC 2014 - nemysis@gmx.ch + +- Add twind-1.1.0.twind.c.patch in spec + +------------------------------------------------------------------- +Mon Sep 8 15:59:15 UTC 2014 - nemysis@gmx.ch + +- Add forgotten twind-1.1.0.COPYING.patch to twind.spec + +------------------------------------------------------------------- +Mon Sep 8 14:23:56 UTC 2014 - nemysis@gmx.ch + +- Initial package creation +- Use mine first FreeBSD port games/twind for patch, new created with Quilt + twind-1.1.0.twind.c.patch +- Add twind-1.1.0.COPYING.patch, correct Address +- Add Desktop file and icon +- Use %%fdupes macro to reduce size of the package diff --git a/twind.desktop b/twind.desktop new file mode 100644 index 0000000..d42e792 --- /dev/null +++ b/twind.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Twin Distress +GenericName=Arcade Game +Comment=Match and remove all of the blocks before time runs out +Icon=twind +Exec=twind +Type=Application +Categories=Game;ArcadeGame; +StartupNotify=false diff --git a/twind.spec b/twind.spec new file mode 100644 index 0000000..641199c --- /dev/null +++ b/twind.spec @@ -0,0 +1,86 @@ +# +# spec file for package twind +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: twind +Version: 1.1.0 +Release: 0 +Summary: Match and remove all of the blocks before time runs out +License: GPL-2.0 +Group: Amusements/Games/Arcade/LogicGame +Url: http://twind.sourceforge.net/ +Source0: %{name}-%{version}.tar.gz +Source1: %{name}.desktop +# Correct bad code +Patch0: twind-1.1.0.twind.c.patch +BuildRequires: desktop-file-utils +BuildRequires: update-desktop-files +BuildRequires: fdupes +BuildRequires: pkgconfig +BuildRequires: SDL-devel +BuildRequires: libSDL_image-devel +BuildRequires: libSDL_mixer-devel + +%description +The object of the game is to remove all of the blocks from the screen +before the time runs out. Two blocks are removed at a time, +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. + +%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 + +%build +#configure +make %{?_smp_mflags} + +%install +mkdir -p %{buildroot}%{_bindir} +make install BIN_PREFIX=%{buildroot}%{_bindir}/ \ + DATA_PREFIX=%{buildroot}%{_datadir}/%{name}/ \ + HIGH_SCORE_PREFIX=%{buildroot}%{_localstatedir}/games/twindistress/ + +# install icon +install -Dm 0644 graphics/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png + +# install Desktop file +install -Dm 0644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop + +%suse_update_desktop_file %{name} + +%fdupes -s %{buildroot}%{_prefix} + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING CREDITS ChangeLog NEWS README +%attr(0755,root,games) %{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/%{name} +%attr(0775,root,games) %{_localstatedir}/games/twindistress +# Correct Permissions +%attr(0664,root,games) %{_localstatedir}/games/twindistress/* + +%changelog