--- snake4-1.0.12.orig/Makefile +++ snake4-1.0.12/Makefile @@ -13,7 +13,7 @@ # Where are shhmsg, shhopt, Xpm and X11? # GNU/Linux at home -INCDIR = -I/local/include -I/usr/X11R6/include -I/local/include/X11 +INCDIR = -I/local/include -I/usr/X11R6/include/X11 -I/local/include/X11 LIBDIR = -L/local/lib -L/usr/X11R6/lib -L/local/lib/X11 EXTRA_LIBS = -lXmu -lICE -lSM -lXext @@ -41,15 +41,15 @@ ########################################################################### # Where do you want to install the program and the highscore file? -INSTLIBDIR = /var/local/lib/games -INSTBINDIR = /usr/local/games -INSTMANDIR = /usr/local/man/man6 +INSTLIBDIR = $(DESTDIR)/var/games +INSTBINDIR = $(DESTDIR)/usr/games +INSTMANDIR = $(DESTDIR)/usr/share/man/man6 #INSTLIBDIR = /hom/sverrehu/lib #INSTBINDIR = /hom/sverrehu/bin/$$HOSTTYPE #INSTMANDIR = /hom/sverrehu/man/man6 # Game user. Program runs suid, so this must not be root. -OWNER = games +OWNER = root GROUP = games #OWNER = sverrehu #GROUP = sverrehu @@ -66,11 +66,13 @@ CC = gcc -OPTIM = -s -O2 +OPTIM = -O2 CCOPT = -Wall $(OPTIM) $(INCDIR) $(DEFINES) $(CFLAGS) -LDOPT = -s $(LIBDIR) $(LDFLAGS) $(EXTRA_LD_OPT) +LDOPT = $(LIBDIR) $(LDFLAGS) $(EXTRA_LD_OPT) -LIBS = -lshhopt -lshhmsg -lXaw -lXt -lXpm -lX11 $(EXTRA_LIBS) +# I wonder why -lshhopt and -lshhmsg fail? +LIBS = /usr/lib/libshhopt.so.1 /usr/lib/libshhmsg.so.1 \ + -lXaw -lXt -lXpm -lX11 $(EXTRA_LIBS) OBJS = board.o fruit.o game.o gameobject.o headbanger.o \ mushroom.o score.o scull.o slimpill.o snake.o \ @@ -89,15 +91,15 @@ $(CC) -o $@ -c $(CCOPT) $< clean: - rm -f *.o core depend *~ + rm -f *.o core depend *~ $(PROG) install: $(PROG) install -d -m 755 $(INSTBINDIR) $(INSTLIBDIR) $(INSTMANDIR) - install -s -m 4755 -o $(OWNER) -g $(GROUP) $(PROG) $(INSTBINDIR) + install -m 2755 -o $(OWNER) -g $(GROUP) $(PROG) $(INSTBINDIR) ln -sf $(PROG) $(INSTBINDIR)/snake4scores install -m 644 $(DIST).6 $(INSTMANDIR) if test ! -f $(SCOREFILE); then \ - install -m 644 -o $(OWNER) -g $(GROUP) \ + install -m 664 -o $(OWNER) -g $(GROUP) \ $(SCOREBASEFILE) $(INSTLIBDIR); fi depend dep: --- snake4-1.0.12.orig/debian/dirs +++ snake4-1.0.12/debian/dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/pixmaps +var/games/snake4 +usr/share/applications --- snake4-1.0.12.orig/debian/docs +++ snake4-1.0.12/debian/docs @@ -0,0 +1,3 @@ +CREDITS +README +TODO --- snake4-1.0.12.orig/debian/menu +++ snake4-1.0.12/debian/menu @@ -0,0 +1,3 @@ +?package(snake4):needs="X11" section="Games/Action"\ + title="Snake4" command="/usr/games/snake4"\ + icon="/usr/share/pixmaps/snake4.xpm" --- snake4-1.0.12.orig/debian/control +++ snake4-1.0.12/debian/control @@ -0,0 +1,19 @@ +Source: snake4 +Section: games +Priority: optional +Maintainer: Jose Carlos Medeiros +Uploaders: Ola Lundqvist +Build-Depends: debhelper (>= 5), libx11-dev, libxt-dev, x-dev, libxaw7-dev, libshhmsg1-dev, libshhopt1-dev, libxmu-dev, libxpm-dev +Standards-Version: 3.7.2 + +Package: snake4 +Architecture: any +Depends: ${shlibs:Depends} +Description: Snake game + This is a basic but nice implementation of the snake game. The objective + is to "snake around" and eat fruit, while avoiding the evil headbanger + and not crashing into your tail. + . + Features five levels of difficulty and a site-wide high score list. + . + Homepage: http://shh.thathost.com/pub-unix/#snake4 --- snake4-1.0.12.orig/debian/links +++ snake4-1.0.12/debian/links @@ -0,0 +1 @@ +usr/share/man/man6/snake4.6 usr/share/man/man6/snake4scores.6 --- snake4-1.0.12.orig/debian/rules +++ snake4-1.0.12/debian/rules @@ -0,0 +1,85 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + # Add here commands to compile the package. + $(MAKE) INSTLIBDIR=/var/games/snake4 + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/snake4. + $(MAKE) install DESTDIR=$(CURDIR)/debian/snake4 + cp debian/snake4.xpm \ + $(CURDIR)/debian/snake4/usr/share/pixmaps; + cp debian/snake4.desktop \ + $(CURDIR)/debian/snake4/usr/share/applications; + rm -f debian/snake4/var/games/snake4.score; + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installmenu + dh_installdebconf + dh_installinfo + dh_installman + dh_link + dh_desktop + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure + --- snake4-1.0.12.orig/debian/watch +++ snake4-1.0.12/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://shh.thathost.com/pub-unix/ files/snake4-(.*)\.tar\.gz --- snake4-1.0.12.orig/debian/changelog +++ snake4-1.0.12/debian/changelog @@ -0,0 +1,142 @@ +snake4 (1.0.12-11) unstable; urgency=low + + * debian/menu: changed section to Games/Action, thanks to Bill Allombert. + (Closes: #444893) + + -- Jose Carlos Medeiros Sat, 03 Nov 2007 01:29:27 +0000 + +snake4 (1.0.12-10) unstable; urgency=low + + * Removed "-s" option from install and ldd in Makefile, to complain with + nostrip build option (policy 10.1). (Closes: #438031) + * Solved debian-rules-ignores-make-clean-error Lintian. + * snake4.desktop: removed invalid "Application" category. + * snake4.menu: changed section to "Games/Puzzles". + + -- Jose Carlos Medeiros Fri, 21 Sep 2007 17:34:24 -0300 + +snake4 (1.0.12-9) unstable; urgency=low + + * Bump Standards-Version: 3.7.2. + * DH_COMPAT = 5 + + -- Jose Carlos Medeiros Thu, 17 May 2007 23:32:14 -0300 + +snake4 (1.0.12-8) unstable; urgency=low + + * Added libxmu-dev and libxpm-dev as Build-Depends. + * Changed point from xpm.h to X11/xpm.h in score.c file. (closes: #365165) + + -- Jose Carlos Medeiros Fri, 28 Apr 2006 19:10:02 -0300 + +snake4 (1.0.12-7) unstable; urgency=low + + * Removed debian/compat file and put DH_COMPAT line in rules file. + * Updated to DH_COMPAT=5. + * Changed depends from Xaw8 to Xaw7. (closes: #359309) + + -- Jose Carlos Medeiros Mon, 27 Mar 2006 16:43:10 -0300 + +snake4 (1.0.12-6) unstable; urgency=low + + * Solved 'FTBFS: build-depends on removed xlibs-dev'. (Closes: #347089) + + -- Jose Carlos Medeiros Mon, 16 Jan 2006 20:51:09 -0200 + +snake4 (1.0.12-5) unstable; urgency=low + + * Updated debian/watch file. + * Added Ola as Uploader. + * Updated to Standards-Version: 3.6.2. + * Added snake4.xpm file, snake4.desktop file and updated menu file. + * Added debian/links file. + + -- Jose Carlos Medeiros Fri, 30 Sep 2005 14:09:26 -0300 + +snake4 (1.0.12-4) unstable; urgency=low + + * New maintainer (Closes: #273706) + * Added compat, watch and postrm file. + * Updated control, rules and postinst files to complain with debhelper 4. + * Updated license in debian/copyright file. + * Changed var/lib/games to var/games/snake4 in dirs file. + * Deleted conffile file. + + -- Jose Carlos Medeiros Fri, 1 Jul 2005 15:10:16 -0300 + +snake4 (1.0.12-3) unstable; urgency=low + + * QA Group upload orphaning this package + * debian/menu: quote the unquoted + * Incorporate previous NMU (closes: #170013) + + -- Andrew Pollock Tue, 9 Nov 2004 09:58:45 +1100 + +snake4 (1.0.12-2.1) unstable; urgency=low + + * NMU + - Moved Build-Depends from libxaw-dev to libxaw6-dev (Closes: #170013) + - Added proper information to debian/copyright + + -- Javier Fernandez-Sanguino Pen~a Fri, 9 Jan 2004 01:02:50 +0100 + +snake4 (1.0.12-2) unstable; urgency=low + + * Updated build-depends to libshhmsg1-dev and libshhopt1-dev + (Closes: #151100) + + -- Karl Soderstrom Fri, 28 Jun 2002 19:08:38 +0200 + +snake4 (1.0.12-1) unstable; urgency=low + + * New upstream release (with clarified license in README) + * Updated debian/copyright with Artistic license (Closes: #130400) + * Fixed typo in description (Closes: #125369) + + -- Karl Soderstrom Sun, 31 Mar 2002 13:35:30 +0200 + +snake4 (1.0.11-4) unstable; urgency=low + + * Added sticky bit to /usr/games/snake4, which means it should + be possible to write to the high score file. (Closes: #115650) + + -- Karl Soderstrom Fri, 14 Dec 2001 14:46:04 +0100 + +snake4 (1.0.11-3) unstable; urgency=low + + * Moved high score file to /var/games. + + -- Karl Soderstrom Sat, 10 Mar 2001 11:56:07 +0100 + +snake4 (1.0.11-2) unstable; urgency=low + + * Updated maintainer email. + * Updated download URL and author contacts. + * Removed INSTALL and empty README.Debian. + + -- Karl Soderstrom Sat, 27 Jan 2001 23:31:01 +0100 + +snake4 (1.0.11-1) unstable; urgency=low + + * New upstream release (Closes: #27562) + * New maintainer (Closes: #74839) + * Compiled against libxpm4 (Closes: #67950) + * Changed to debhelper + + -- Karl Soderstrom Fri, 8 Dec 2000 20:20:04 +0100 + +snake4 (1.0.10-1.1) unstable; urgency=low + + * NMU by Branden Robinson . + * Recompile against modern xpm4g package to get proper shared library + dependency and permit this package to be installed with forthcoming + XFree86 4.x packages, which include libXpm. + * debian/control: added Build-Depends + + -- Branden Robinson Mon, 23 Oct 2000 14:28:59 -0500 + +snake4 (1.0.10-1) unstable; urgency=low + + * Initial Release. + + -- Ole J. Tetlie Sun, 7 Dec 1997 17:24:35 +0100 --- snake4-1.0.12.orig/debian/postinst +++ snake4-1.0.12/debian/postinst @@ -0,0 +1,53 @@ +#! /bin/sh +# postinst script for teste +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + # Move high score file + if [ -f /var/lib/games/snake4.score ]; then + mv -f /var/lib/games/snake4.score /var/games/snake4 + fi + # if score file is empty, create one. + if [ ! -f /var/games/snake4/snake4.score ]; then + echo '1' > /var/games/snake4/snake4.score; + echo 'sverrehu,Sverre H. Huseby,117474,4,1996-10-10 20:31:11' >> \ + /var/games/snake4/snake4.score + fi + chown root:games /var/games/snake4/snake4.score; + chmod 664 /var/games/snake4/snake4.score; + dpkg-statoverride --add --force --update root games 2755 \ + /usr/games/snake4; + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- snake4-1.0.12.orig/debian/compat +++ snake4-1.0.12/debian/compat @@ -0,0 +1 @@ +5 --- snake4-1.0.12.orig/debian/snake4.desktop +++ snake4-1.0.12/debian/snake4.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Encoding=UTF-8 +Terminal=0 +Name=Snake4 +Icon=/usr/share/pixmaps/snake4.xpm +GenericName=Snake4 Game +Exec=/usr/games/snake4 +Categories=Game;ActionGame +Comment=Fruit-eating snake game + --- snake4-1.0.12.orig/debian/postrm +++ snake4-1.0.12/debian/postrm @@ -0,0 +1,40 @@ +#! /bin/sh +# postrm script for teste +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -f /var/games/snake4/snake4.score; + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + dpkg-statoverride --remove /usr/games/snake4; + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- snake4-1.0.12.orig/debian/snake4.xpm +++ snake4-1.0.12/debian/snake4.xpm @@ -0,0 +1,108 @@ +/* XPM */ +static char * snake4_xpm[] = { +"32 32 73 1", +" c #000000", +". c #393939", +"+ c #838383", +"@ c #B7B7B7", +"# c #9B9B9B", +"$ c #4C4C4C", +"% c #1D1D1D", +"& c #171700", +"* c #A4A400", +"= c #717171", +"- c #6F6F6F", +"; c #A2A2A2", +"> c #535353", +", c #3A3A3A", +"' c #464600", +") c #757500", +"! c #E0E0E0", +"~ c #363636", +"{ c #121212", +"] c #7E7E7E", +"^ c #5A5A5A", +"/ c #8D8D8D", +"( c #393900", +"_ c #E7E700", +": c #CFCF00", +"< c #D3D300", +"[ c #242424", +"} c #909090", +"| c #AAAA00", +"1 c #1D1D00", +"2 c #A7A7A7", +"3 c #696900", +"4 c #BCBCBC", +"5 c #777777", +"6 c #565656", +"7 c #1C1C00", +"8 c #555500", +"9 c #B8B800", +"0 c #777700", +"a c #9E9E9E", +"b c #008200", +"c c #00FF00", +"d c #005100", +"e c #ABAB00", +"f c #ACAC00", +"g c #9D9D00", +"h c #2B2B00", +"i c #0E0E00", +"j c #00C300", +"k c #0000D3", +"l c #1C0000", +"m c #550000", +"n c #556C00", +"o c #1C4800", +"p c #005A00", +"q c #00A200", +"r c #C60000", +"s c #FF0000", +"t c #C62400", +"u c #715A00", +"v c #F10E00", +"w c #BA4800", +"x c #E31200", +"y c #E31D00", +"z c #C73A00", +"A c #F50000", +"B c #8E0000", +"C c #7A0000", +"D c #710000", +"E c #D61D00", +"F c #890000", +"G c #2B0000", +"H c #480000", +" .+@#$% &*", +".=-;;>,% ')", +"!~{]^{~/ (_'", +"!~~^~~~/ (:<'", +"[};^^;}[ (_<|1", +" [2]^^[ (:<<3 ", +"~^4566^~ 78_<90 ", +";~-#a6~; bcccd efgghi ", +" cjjjjjb ", +" ccccccjjjjjjjbb ", +" ccjjjjjjjjjjjjjjjb ", +" cjjjjjjjjjjkkkkjjjjb ", +" cjjjjbjjjjjjjjjjjjjj ", +"cjjjjjjbjjjjjjjjjjjjj ", +"cjjjjjjjjbjjkkkkjjjjd ", +"cjjbjjbjjjjjjjjjjjjd ", +"cjjjbjjjddjjjjjjjdd ", +"cjjjjjjd djjjjbd ", +"cjjjjbjd ddd ", +"cjbjjjjd ", +"cjjjjjjd ", +"cjjbjjjd ", +"cjjjbjjd ", +"cjjjjjjd ", +"cjjjjbjd lmnopqlm", +"cjjjjbjd rsstqurs", +" jjjjjd vwxuntsy", +" bjjbbd vvxxyysy", +" bbjd sszyszsA", +" bjjd BsyszsAC", +" dd DrsyEFG", +" lmmH "}; --- snake4-1.0.12.orig/debian/copyright +++ snake4-1.0.12/debian/copyright @@ -0,0 +1,20 @@ +This package was debianized by Ole J. Tetlie olet@debian.org on +Sun, 7 Dec 1997 17:24:35 +0100. + +It was downloaded from http://shh.thathost.com/pub-unix/ + +Upstream Author: Sverre H. Huseby + +Copyright: (c) 1996-2002 Sverre H. Huseby + +License: + + This program is free software; you can redistribute it and/or modify it + under the terms of the "Artistic License" which comes with Debian. + + THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES + OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +On Debian systems, the complete text of the Artistic License +can be found in `/usr/share/common-licenses/Artistic'. --- snake4-1.0.12.orig/board.c +++ snake4-1.0.12/board.c @@ -32,7 +32,7 @@ #include "board.h" /* must be last to avoid redefinition of Pixel */ -#include +#include