debian/0000755000000000000000000000000012257331100007160 5ustar debian/compat0000644000000000000000000000000212152663754010377 0ustar 9 debian/copyright0000644000000000000000000000215112257330626011126 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pacman Source: https://sites.google.com/site/doctormike/pacman.html Files: * Copyright: 2006 Michael Billars License: GPL-2.0+ Files: debian/* Copyright: 2006-2013 Joao Eriberto Mota Filho License: GPL-2.0+ License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/lintian-overrides0000644000000000000000000000014012152663754012555 0ustar # The package has a map editor in usr/bin pacman4console: package-section-games-but-has-usr-bin debian/pacman4consoleedit.10000644000000000000000000000216512152663754013043 0ustar .TH PACMAN4CONSOLEEDIT 1 "january 4, 2007" .SH NAME pacman4consoleedit \- editor to make pacman4console mazes .SH SYNOPSIS .B pacman4consoleedit file .SH DESCRIPTION This manual page documents briefly the .B pacman4consoleedit. .PP \fBpacman4consoleedit\fP is an editor used to make new pacman4console mazes. .SH KEYS 0 Insert space (way) .br 1 Insert wall .br 2 Insert pill .br 3 Insert vitamin .br 4 Insert an exit for fantasms .br 5 Change position of the red fantasm .br 6 Change position of the cyan fantasm .br 7 Change position of the magenta fantasm .br 8 Change position of the orange fantasm .br 9 Change position of the Pacman .br f Change all spaces to pills .br c Change all pills to spaces .br q Save and exit .SH MAZE FILE LOCATION The maze files are localized at /usr/share/pacman4console/Levels. .SH SEE ALSO pacman4console(6) .SH AUTHOR pacman4console was written by Michael Billars (aka Dr. Mike) and is available at https://sites.google.com/site/doctormike/pacman.html. .PP .nh .ad l This manual page was written by Joao Eriberto Mota Filho for the Debian project (but may be used by others). debian/docs0000644000000000000000000000002612152663754010052 0ustar README screenshot.png debian/patches/0000755000000000000000000000000012152667350010624 5ustar debian/patches/fix_array_index.patch0000644000000000000000000000573712152663754015040 0ustar Description: Fix array index out of bounds if pacman or ghost is going through one border to the opposite site. Author: Yannic Scheper Last-Update: 20110915 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pacman4console-1.2~/pacman.c pacman4console-1.2/pacman.c --- pacman4console-1.2~/pacman.c 2006-12-14 05:51:58.000000000 +0100 +++ pacman4console-1.2/pacman.c 2011-09-15 00:18:28.765403666 +0200 @@ -226,6 +226,7 @@ void GetInput() { int ch; static int chtmp; + int tmp; ch = getch(); @@ -235,26 +236,34 @@ switch (ch) { case KEY_UP: case 'w': case 'W': - if((Level[Loc[4][0] - 1][Loc[4][1]] != 1) - && (Level[Loc[4][0] - 1][Loc[4][1]] != 4)) + if(Loc[4][0] == 0) tmp = 28; + else tmp = Loc[4][0] - 1; + if((Level[tmp][Loc[4][1]] != 1) + && (Level[tmp][Loc[4][1]] != 4)) { Dir[4][0] = -1; Dir[4][1] = 0; } break; case KEY_DOWN: case 's': case 'S': - if((Level[Loc[4][0] + 1][Loc[4][1]] != 1) - && (Level[Loc[4][0] + 1][Loc[4][1]] != 4)) + if(Loc[4][0] == 28) tmp = 0; + else tmp = Loc[4][0] + 1; + if((Level[tmp][Loc[4][1]] != 1) + && (Level[tmp][Loc[4][1]] != 4)) { Dir[4][0] = 1; Dir[4][1] = 0; } break; case KEY_LEFT: case 'a': case 'A': - if((Level[Loc[4][0]][Loc[4][1] - 1] != 1) - && (Level[Loc[4][0]][Loc[4][1] - 1] != 4)) + if(Loc[4][1] == 0) tmp = 27; + else tmp = Loc[4][1] - 1; + if((Level[Loc[4][0]][tmp] != 1) + && (Level[Loc[4][0]][tmp] != 4)) { Dir[4][0] = 0; Dir[4][1] = -1; } break; case KEY_RIGHT: case 'd': case 'D': - if((Level[Loc[4][0]][Loc[4][1] + 1] != 1) - && (Level[Loc[4][0]][Loc[4][1] + 1] != 4)) + if(Loc[4][1] == 27) tmp = 0; + else tmp = Loc[4][1] + 1; + if((Level[Loc[4][0]][tmp] != 1) + && (Level[Loc[4][0]][tmp] != 4)) { Dir[4][0] = 0; Dir[4][1] = 1; } break; @@ -424,6 +433,7 @@ int tmpdx = 0; int tmpdy = 0; int checksides[] = { 0, 0, 0, 0, 0, 0 }; static int SlowerGhosts = 0; + int tmp; if(Invincible == 1) { SlowerGhosts++; @@ -445,10 +455,18 @@ //Determine which directions we can go for(b = 0; b < 4; b++) checksides[b] = 0; - if(Level[Loc[a][0] + 1][Loc[a][1]] != 1) checksides[0] = 1; - if(Level[Loc[a][0] - 1][Loc[a][1]] != 1) checksides[1] = 1; - if(Level[Loc[a][0]][Loc[a][1] + 1] != 1) checksides[2] = 1; - if(Level[Loc[a][0]][Loc[a][1] - 1] != 1) checksides[3] = 1; + if(Loc[a][0] == 28) tmp = 0; + else tmp = Loc[a][0] + 1; + if(Level[tmp][Loc[a][1]] != 1) checksides[0] = 1; + if(Loc[a][0] == 0) tmp = 28; + else tmp = Loc[a][0] - 1; + if(Level[tmp][Loc[a][1]] != 1) checksides[1] = 1; + if(Loc[a][1] == 27) tmp = 0; + else tmp = Loc[a][1] + 1; + if(Level[Loc[a][0]][tmp] != 1) checksides[2] = 1; + if(Loc[a][1] == 0) tmp = 27; + else tmp = Loc[a][1] - 1; + if(Level[Loc[a][0]][tmp] != 1) checksides[3] = 1; //Don't do 180 unless we have to c = 0; for(b = 0; b < 4; b++) if(checksides[b] == 1) c++; debian/patches/levels.patch0000644000000000000000000000140212152663754013140 0ustar Description: change levels location in pacman.h. Author: Joao Eriberto Mota Filho Last-Update: 20130506 diff -Naur pacman4console-1.0.orig/pacman.h pacman4console-1.0/pacman.h --- pacman4console-1.0.orig/pacman.h 2006-06-12 07:41:40.000000000 -0300 +++ pacman4console-1.0/pacman.h 2006-12-08 11:49:25.000000000 -0200 @@ -1,5 +1,5 @@ // Some variables that you may want to change -char LevelFile[50] = "/usr/local/share/pacman/Levels/level__.dat"; //Locations of default levels +char LevelFile[50] = "/usr/share/pacman4console/Levels/level__.dat"; //Locations of default levels int FreeLife = 1000; //Starting points for free life int Points = 0; //Initial points int Lives = 3; //Number of lives you start with debian/patches/pacman.c.patch0000644000000000000000000000057712152663754013342 0ustar Description: fix possible buffer overflow when using an argument larger than 99 characters to start the program. Author: Yannic Scheper Last-Update: 20110914 --- a/pacman.c +++ b/pacman.c @@ -59,6 +59,7 @@ //If they specified a level to load if((argc > 1) && (strlen(argv[1]) > 1)) { + argv[1][99] = '\0'; LoadLevel(argv[1]); MainLoop(); } debian/patches/series0000644000000000000000000000010112152663754012035 0ustar fix_array_index.patch pacman.c.patch levels.patch Makefile.patch debian/patches/Makefile.patch0000644000000000000000000000222512152663754013367 0ustar Description: makes Makefile compliant with Debian and adds GCC hardening. Author: Joao Eriberto Mota Filho Last-Update: 20130506 --- a/Makefile +++ b/Makefile @@ -1,17 +1,13 @@ all: - gcc -lncurses pacman.c -o pacman - gcc -lncurses pacmanedit.c -o pacmanedit + gcc pacman.c -o pacman $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses + gcc pacmanedit.c -o pacmanedit $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses install: all - cp pacman /usr/local/bin - cp pacmanedit /usr/local/bin - mkdir -p /usr/local/share/pacman - cp -fR Levels/ /usr/local/share/pacman/ - chown root:games /usr/local/bin/pacman - chown root:games /usr/local/share/pacman -R - chmod 750 /usr/local/bin/pacman - chmod 750 /usr/local/bin/pacmanedit - chmod 750 /usr/local/share/pacman/ -R + install -D pacman $(DESTDIR)/usr/games/pacman4console + install -D pacmanedit $(DESTDIR)/usr/bin/pacman4consoleedit + install -d $(DESTDIR)/usr/share/pacman4console/Levels + install -m 644 Levels/*dat $(DESTDIR)/usr/share/pacman4console/Levels/ + install -D -m 644 Levels/README $(DESTDIR)/usr/share/doc/pacman4console/README.editor uninstall: rm -f /usr/local/bin/pacman debian/source/0000755000000000000000000000000012257331015010465 5ustar debian/source/lintian-overrides0000644000000000000000000000015712257331015014051 0ustar # The upstream didn't provide a PGP/GPG signature. pacman4console source: debian-watch-may-check-gpg-signature debian/source/format0000644000000000000000000000001412152663754011707 0ustar 3.0 (quilt) debian/manpages0000644000000000000000000000006412152663754010717 0ustar debian/pacman4console.6 debian/pacman4consoleedit.1 debian/control0000644000000000000000000000151212257330512010570 0ustar Source: pacman4console Section: games Priority: optional Maintainer: Joao Eriberto Mota Filho Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), libncurses5-dev Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/pacman4console.git Vcs-Git: git://anonscm.debian.org/collab-maint/pacman4console.git Homepage: https://sites.google.com/site/doctormike/pacman.html Package: pacman4console Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: console based pacman game This is a simple but very good pacman game. Also, its source code is very simple and well commented so it may be a good reference for learning ncurses and C programming. . Pacman4Console is an ASCII character based game. This game has nine levels. But you can make your own levels. debian/changelog0000644000000000000000000000607512257330736011060 0ustar pacman4console (1.2-5) unstable; urgency=medium * Bumped Standards-Version from 3.9.4 to 3.9.5. * debian/copyright: added the upstream e-mail address. * debian/control: - Changed Priority from extra to optional. - Fixed the Vcs-Browser field. * debian/source/: added an override to reply to check-gpg-signature. * debian/watch: improved. -- Joao Eriberto Mota Filho Fri, 27 Dec 2013 14:53:25 -0200 pacman4console (1.2-4) unstable; urgency=low * debian/watch: re-added. Thanks a lot to Bart Martens . * debian/source/lintian-overrides: removed because it is useless now. -- Joao Eriberto Mota Filho Thu, 25 Jul 2013 11:42:24 -0300 pacman4console (1.2-3) unstable; urgency=low * Migrations: - debian format from 1.0 to 3.0. (Closes: #661027) - debian/changelog to 1.0. - debhelper level from 5 to 9. - patch system from dpatch to quilt. - VCS: svn to git. * debian/control: - added dpkg-dev as Build-Depends. - added ${misc:Depends} to Depends field. - droped leading article from short description. - removed screeshot reference from long description. - updated Standards-Version from 3.7.3 to 3.9.4. - updated homepage. * debian/dirs: removed. Using Makefile only. * debian/gbp.conf: added to allow git-buildpackage use. * debian/manpages: created to install manuals. * debian/override: renamed to lintian-overrides. * debian/patches/ - fix_array_index.patch: Fix array index out of bounds if pacman or ghost is going through one border to the opposite site. Thanks to Yannic Scheper. (Closes: #641657) - Makefile.patch: . added GCC hardening. . adjusted lncurses position to avoid FTBFS when using --as-needed. Thanks to Alex Chiang. (Closes: #641384) . switched several commands by "install" to simplify actions. - pacman.c.patch: fix possible buffer overflow when using an argument larger than 99 characters to start the program. Thanks to Yannic Scheper. (Closes: #641652) * debian/rules: updated to new (reduced) format. * debian/watch: removed because the current page doesn't allow watch. Made an overide for this situation. * manpages: fixed little mistakes. -- Joao Eriberto Mota Filho Tue, 30 Apr 2013 21:55:50 -0300 pacman4console (1.2-2) unstable; urgency=low * Cleaned debian/rules file. * Changed Makefile patch to fix .dat permissions. * Moved README file from /usr/share/pacman4console/Levels to /usr/share/doc/pacman4console. * Added the screenshot.png file to debian/docs. * Fixed the debian/watch sintax to access GooglePages site (Closes: #450247). * Added "screenshot" to long description. -- Joao Eriberto Mota Filho Mon, 11 Nov 2007 16:48:15 -0200 pacman4console (1.2-1) unstable; urgency=low * Initial release (Closes: #402287) -- Joao Eriberto Mota Filho Fri, 8 Dec 2006 10:54:06 -0200 debian/pacman4console.60000644000000000000000000000123612152663754012200 0ustar .TH PACMAN4CONSOLE 6 "december 8, 2006" .SH NAME pacman4console \- console based pacman game .SH SYNOPSIS .B pacman4console .RB [ .I OPTION .RB ] .SH DESCRIPTION This manual page documents briefly the .B pacman4console. .PP \fBpacman4console\fP is an ASCII character based game. This game has nine levels. .SH OPTION .B n - Start level n .SH SEE ALSO pacman4consoleedit(1) .SH AUTHOR pacman4console was written by Michael Billars (aka Dr. Mike) and is available at https://sites.google.com/site/doctormike/pacman.html. .PP .nh .ad l This manual page was written by Joao Eriberto Mota Filho for the Debian project (but may be used by others). debian/watch0000644000000000000000000000013412257330275010223 0ustar version=3 https://sites.google.com/site/doctormike/pacman.html .*/pacman-(\d\S*)\.tar\.gz.* debian/rules0000755000000000000000000000020012152663754010251 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk %: dh $@ --parallel debian/gbp.conf0000644000000000000000000000006512152663754010621 0ustar [DEFAULT] debian-branch = debian pristine-tar = True