1 --- wok-1.0.orig/debian/patches/03_sounds_dir.patch
2 +++ wok-1.0/debian/patches/03_sounds_dir.patch
4 +diff -ruN wok-1.0.orig/sound.c wok-1.0.new/sound.c
5 +--- wok-1.0.orig/sound.c 2001-11-10 06:28:18.000000000 +0100
6 ++++ wok-1.0.new/sound.c 2006-09-23 21:58:05.000000000 +0200
8 + #include "SDL_mixer.h"
11 ++#ifndef SOUNDS_DIRECTORY
12 ++#define SOUNDS_DIRECTORY "sounds/"
15 + // Include music_ogg.h and define _Mix_Music to rewind the ogg audio.
16 + #include "music_ogg.h"
18 ++/* enum already defined in SDL_mixer.h - Miriam Ruiz, Jan 2005
27 ++ Mix_MusicType type;
34 + for ( i=0 ; i<MUSIC_NUM ; i++ ) {
35 +- strcpy(name, "sounds/");
36 ++ strcpy(name, SOUNDS_DIRECTORY);
37 + strcat(name, musicFileName[i]);
38 + if ( NULL == (music[i] = Mix_LoadMUS(name)) ) {
39 + fprintf(stderr, "Couldn't load: %s\n", name);
43 + for ( i=0 ; i<CHUNK_NUM ; i++ ) {
44 +- strcpy(name, "sounds/");
45 ++ strcpy(name, SOUNDS_DIRECTORY);
46 + strcat(name, chunkFileName[i]);
47 + if ( NULL == (chunk[i] = Mix_LoadWAV(name)) ) {
48 + fprintf(stderr, "Couldn't load: %s\n", name);
49 --- wok-1.0.orig/debian/patches/04_home_dir.patch
50 +++ wok-1.0/debian/patches/04_home_dir.patch
52 +diff -ruN wok-1.0.orig/wok.c wok-1.0.new/wok.c
53 +--- wok-1.0.orig/wok.c 2001-11-10 06:28:18.000000000 +0100
54 ++++ wok-1.0.new/wok.c 2006-09-23 21:58:05.000000000 +0200
65 + static int noSound = 0;
67 +-#define WOK_PREF_FILE "wok.prf"
68 ++#define WOK_PREF_FILE "/.wok.prf"
69 + #define DEFAULT_HI_SCORE 1000000
71 + // Initialize and load preference.
72 + static void initWok() {
76 +- if ( NULL == (fp = fopen(WOK_PREF_FILE,"rb")) ) {
77 ++ tmpname = getenv("HOME");
78 ++ if (strlen(tmpname)>=255-sizeof(WOK_PREF_FILE)) {
79 ++ fprintf(stderr,"Preferences filename is too long.");
80 ++ hiScore = DEFAULT_HI_SCORE;
83 ++ strncpy(name, tmpname,256);
84 ++ strncat(name, WOK_PREF_FILE,256);
85 ++ if ( NULL == (fp = fopen(name,"rb")) ) {
86 + hiScore = DEFAULT_HI_SCORE;
91 + // Quit and save preference.
96 + if ( !noSound ) closeSound();
99 +- if ( NULL == (fp = fopen(WOK_PREF_FILE,"wb")) ) exit(1);
100 ++ tmpname = getenv("HOME");
101 ++ if (strlen(tmpname)>=255-sizeof(WOK_PREF_FILE)) {
102 ++ fprintf(stderr,"Preferences filename is too long.");
105 ++ strncpy(name, tmpname,256);
106 ++ strncat(name, WOK_PREF_FILE,256);
107 ++ if ( NULL == (fp = fopen(name,"wb")) ) {
108 ++ fprintf(stderr,"Cannot save preferences.");
114 --- wok-1.0.orig/debian/patches/01_makefile.patch
115 +++ wok-1.0/debian/patches/01_makefile.patch
117 +diff -ruN wok-1.0.orig/Makefile wok-1.0.new/Makefile
118 +--- wok-1.0.orig/Makefile 2001-11-10 06:28:24.000000000 +0100
119 ++++ wok-1.0.new/Makefile 2006-09-23 21:58:05.000000000 +0200
124 ++IMAGES_DIR = images/
125 ++SOUNDS_DIR = sounds/
127 + SDL_LIB = -L/usr/lib -L/usr/local/lib
128 + SDL_INCLUDE = -I/usr/include/SDL -I/usr/local/include/SDL
130 + DEFAULT_CFLAGS = $(SDL_INCLUDE)
133 +-MORE_CFLAGS = -O3 -DOGG_MUSIC
135 + LDFLAGS = $(SDL_LIB) -lSDL -lSDL_image -lSDL_mixer -lpthread
137 +-CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
138 ++DEFINES = -DOGG_MUSIC \
139 ++ -DSOUNDS_DIRECTORY=\"$(SOUNDS_DIR)\" \
140 ++ -DIMAGES_DIRECTORY=\"$(IMAGES_DIR)\"
142 ++CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS) $(DEFINES)
144 + OBJS = $(NAME).$(O) pan.$(O) ball.$(O) board.$(O) generator.$(O) attract.$(O)\
145 + screen.$(O) sound.$(O) vector.$(O)
146 --- wok-1.0.orig/debian/patches/02_images_dir.patch
147 +++ wok-1.0/debian/patches/02_images_dir.patch
149 +diff -ruN wok-1.0.orig/screen.c wok-1.0.new/screen.c
150 +--- wok-1.0.orig/screen.c 2001-11-10 06:28:18.000000000 +0100
151 ++++ wok-1.0.new/screen.c 2006-09-23 21:58:05.000000000 +0200
154 + #include "screen.h"
156 ++#ifndef IMAGES_DIRECTORY
157 ++#define IMAGES_DIRECTORY "images/"
160 + #define SPRITE_NUM_RED_BACK 3
161 + #define SPRITE_NUM_BLUE_BACK (6+10+1+8+4+2+6+8)
162 + #define SPRITE_NUM (SPRITE_NUM_RED_BACK+SPRITE_NUM_BLUE_BACK)
164 + color[0].r = 255; color[0].g = 0; color[0].b = 0;
165 + SDL_SetColors(video, color, 0, 1);
166 + for ( i=0 ; i<SPRITE_NUM_RED_BACK ; i++ ) {
167 +- strcpy(name, "images/");
168 ++ strcpy(name, IMAGES_DIRECTORY);
169 + strcat(name, spriteFile[i]);
170 + img = IMG_Load(name);
171 + if ( img == NULL ) {
173 + color[0].r = 0; color[0].g = 0; color[0].b = 255;
174 + SDL_SetColors(video, color, 0, 1);
175 + for ( ; i<SPRITE_NUM ; i++ ) {
176 +- strcpy(name, "images/");
177 ++ strcpy(name, IMAGES_DIRECTORY);
178 + strcat(name, spriteFile[i]);
179 + img = IMG_Load(name);
180 + if ( img == NULL ) {
181 --- wok-1.0.orig/debian/patches/series
182 +++ wok-1.0/debian/patches/series
184 +01_makefile.patch -p1
185 +02_images_dir.patch -p1
186 +03_sounds_dir.patch -p1
187 +04_home_dir.patch -p1
188 --- wok-1.0.orig/debian/changelog
189 +++ wok-1.0/debian/changelog
191 +wok (1.0-1) unstable; urgency=low
196 + - Commented out and replaced enum defined in sound.c as it was already
197 + defined in SDL_mixer.h
198 + - Modified screen.c and sound.c to configure "images/" and "sounds/"
199 + directories through preprocessor definitions
200 + - Modified sound.c to load audio from the same directory as sounds, rather
201 + than a hard-coded path.
202 + - Modified wok.c to store preferences in $HOME.
205 + * update menu section to "Games/Action" for menu policy transition.
206 + Thanks Linas Žvirblis.
208 + [ Cyril Brulebois ]
209 + * Added XS-Vcs-Svn and XS-Vcs-Browser fields in the control file.
211 + -- Miriam Ruiz <little_miry@yahoo.es> Tue, 04 Sep 2007 09:15:15 +0000
212 --- wok-1.0.orig/debian/control
213 +++ wok-1.0/debian/control
218 +Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
219 +Uploaders: Miriam Ruiz <little_miry@yahoo.es>, Dafydd Harries <daf@debian.org>
220 +Build-Depends: debhelper (>= 4.0.0), quilt, libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev, libogg-dev (>=1.0rc2-2), libvorbis-dev (>=1.0rc2-2)
221 +Standards-Version: 3.7.2
222 +XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/wok/
223 +XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/wok/?op=log
227 +Depends: ${shlibs:Depends}, wok-data (= ${source:Version})
228 +Description: oddly attractive ball tossing game
229 + The game objective is very simple. Catch the falling balls by the wok
230 + (a flying pan) and throw them to the right. You can control the wok by
232 + To earn more score, you should throw many balls continuously. Collect
233 + many balls on the wok, and throw them at the same time.
234 + If a ball falls to the lower end of the screen, the game is over.
236 + Wok was created by Kenta Cho.
238 + Homepage: http://www.asahi-net.or.jp/~cs8k-cyu/linux/wok_e.html
242 +Depends: ${misc:Depends}
244 +Description: oddly attractive ball tossing game - data files
245 + The game objective is very simple. Catch the falling balls by the wok
246 + (a flying pan) and throw them to the right. You can control the wok by
248 + To earn more score, you should throw many balls continuously. Collect
249 + many balls on the wok, and throw them at the same time.
250 + If a ball falls to the lower end of the screen, the game is over.
252 + This package contains data files for the wok game.
253 --- wok-1.0.orig/debian/wok-data.docs
254 +++ wok-1.0/debian/wok-data.docs
257 --- wok-1.0.orig/debian/rules
258 +++ wok-1.0/debian/rules
262 +#export DH_VERBOSE=1
264 +CFLAGS = -DLINUX -Wall -g
266 +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
277 + $(MAKE) -f /usr/share/quilt/quilt.make patch
279 + $(MAKE) MORE_CFLAGS="$(CFLAGS)" \
280 + IMAGES_DIR="/usr/share/games/wok/images/" \
281 + SOUNDS_DIR="/usr/share/games/wok/sounds/"
292 + $(MAKE) -f /usr/share/quilt/quilt.make unpatch
297 + dh_installdirs -i usr/share/games/wok/images
298 + dh_installdirs -i usr/share/games/wok/sounds
299 + dh_install -i images/* usr/share/games/wok/images
300 + dh_install -i sounds/* usr/share/games/wok/sounds
305 + dh_installdirs -a usr/games
306 + dh_install -a wok usr/games
307 + dh_installdirs -a usr/share/pixmaps
308 + dh_install -a debian/wok.xpm usr/share/pixmaps
310 +install: install-arch install-indep
312 +binary-indep: install-indep
315 + dh_installchangelogs -i
324 +binary-arch: install-arch
328 + dh_installman -a debian/wok.6
329 + dh_link -a usr/share/doc/wok-data usr/share/doc/wok
339 +binary: binary-indep binary-arch
341 +.PHONY: build clean install-indep install-arch install binary-indep \
344 --- wok-1.0.orig/debian/copyright
345 +++ wok-1.0/debian/copyright
347 +This package was debianized by Miriam Ruiz <little_miry@yahoo.es> on
348 +Mon, 24 Jan 2005 18:40:00 +0100.
350 +It was downloaded from http://www.asahi-net.or.jp/~cs8k-cyu/linux/wok_e.html
352 +Copyright: Kenta Cho, 2001.
354 +Author: Kenta Cho <cs8k-cyu@asahi-net.or.jp>
358 +Redistribution and use in source and binary forms,
359 +with or without modification, are permitted provided that
360 +the following conditions are met:
362 + 1. Redistributions of source code must retain the above copyright notice,
363 + this list of conditions and the following disclaimer.
365 + 2. Redistributions in binary form must reproduce the above copyright notice,
366 + this list of conditions and the following disclaimer in the documentation
367 + and/or other materials provided with the distribution.
369 +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
370 +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
371 +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
372 +THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
373 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
374 +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
375 +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
376 +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
377 +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
378 +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
379 --- wok-1.0.orig/debian/compat
380 +++ wok-1.0/debian/compat
383 --- wok-1.0.orig/debian/wok.xpm
384 +++ wok-1.0/debian/wok.xpm
387 +static char *wok[]={
395 +"..................##............",
396 +"..................##.........aa.",
397 +"............................aaaa",
398 +"...aaa......bbb.............aaaa",
399 +"..aaaaa....bbbbb.............aa.",
400 +"..aaaaa....bbbbb................",
401 +"..aaaaa....bbbbb................",
402 +"...aaa......bbb.................",
403 +"............................bb..",
404 +"....................###.....bb..",
405 +"...................#####........",
406 +"...................#####........",
407 +".............##....#####........",
408 +"............####....###.........",
409 +"....ccc.....####................",
410 +"....cdc......##.................",
411 +"....ccc.........................",
412 +".....................bb.........",
413 +"...ccc..............bbbb........",
414 +"...cdc.........aa...bbbb........",
415 +"...ccc.........aa....bb.....ccc.",
416 +"............................cdc.",
417 +"..ccc.......................ccc.",
418 +"..cdc.ccc.......................",
419 +"..ccc.cdc.ccc..............ccc..",
420 +"......ccc.cdc.ccc..........cdc..",
421 +"..........ccc.cdc.ccc......ccc..",
422 +"..............ccc.cdc.ccc.......",
423 +"..................ccc.cdc.ccc...",
424 +"......................ccc.cdc...",
425 +"..........................ccc...",
426 +"................................"};
427 --- wok-1.0.orig/debian/menu
428 +++ wok-1.0/debian/menu
430 +?package(wok):needs="X11" section="Games/Action"\
431 + title="Wok" command="/usr/games/wok" \
432 + icon="/usr/share/pixmaps/wok.xpm"
433 --- wok-1.0.orig/debian/wok.6
434 +++ wok-1.0/debian/wok.6
439 +Miriam Ruiz <little_miry@yahoo.es>, 2005.
440 +Dafydd Harries <daf@muse.19inch.net>, 2005.
442 +This next line loads the www macro package so that the .URL macro can be used.
445 +.TH Wok 6 "26 January 2005" Wok Games
448 +Wok \- ball-catching game
454 +[\-mousespeed \fInum\fR]
459 +Stop balls from hitting the floor.
467 +These command line options are available:
473 +Launch the game in a window, rather than full\-screen.
475 +.B \-mousespeed \fInum\fR
476 +Use \fInum\fR as the speed of the mouse movement. 10 is the default.
479 +Reverse the fire key and the special key.
485 +This is where Wok records your high score.
487 +rRootage was written by Kenta Cho.
489 +This manual page was written for Debian by Miriam Ruiz <little_miry@yahoo.es>
490 +and Dafydd Harries <daf@muse.19inch.net>.
495 +This is rather hacky -- the turn off line adjustment temporarily using .na/.ad
496 +since lines with very long words (like URLs) look ugly.
499 +.URL http://www.asahi-net.or.jp/~cs8k-cyu/linux/wok_e.html "Wok homepage" .