This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to annotated tag debian/3.2.1-1
in repository nethack.

commit 9dd14dd060f73817ece383576a76b24ee5467f42
Author: Paul Haggart <[email protected]>
Date:   Sun Oct 27 05:56:48 1996 -0500

    Imported Debian patch 3.2.1-1
---
 sys/unix/Makefile.top => Makefile      |  39 +++++++------
 dat/Makefile                           |  87 ++++++++++++++++++++++++++++
 debian/changelog                       |  10 ++++
 debian/control                         |  23 ++++++++
 debian/copyright                       | 103 +++++++++++++++++++++++++++++++++
 debian/rules                           |  47 +++++++++++++++
 doc/Makefile                           |  85 +++++++++++++++++++++++++++
 include/config.h                       |  23 +++++---
 include/global.h                       |   5 ++
 include/unixconf.h                     |  10 +++-
 sys/unix/Makefile.src => src/Makefile  |  11 ++--
 src/files.c                            |  18 ++++--
 src/mail.c                             |   4 ++
 sys/unix/Makefile.src                  |  11 ++--
 sys/unix/Makefile.top                  |  25 ++++----
 sys/unix/Makefile.utl                  |  16 ++---
 sys/unix/unixmain.c                    |   8 +++
 sys/unix/unixunix.c                    |   9 ++-
 sys/unix/Makefile.utl => util/Makefile |  16 ++---
 19 files changed, 477 insertions(+), 73 deletions(-)

diff --git a/sys/unix/Makefile.top b/Makefile
similarity index 87%
copy from sys/unix/Makefile.top
copy to Makefile
index 56de355..bef10e3 100644
--- a/sys/unix/Makefile.top
+++ b/Makefile
@@ -20,10 +20,10 @@ GAMEGRP  = bin
 
 # Permissions - some places use setgid instead of setuid, for instance
 # See also the option "SECURE" in include/config.h
-GAMEPERM = 04755
-FILEPERM = 0644
-EXEPERM  = 0755
-DIRPERM  = 0755
+GAMEPERM = 4755
+FILEPERM = 644
+EXEPERM  = 755
+DIRPERM  = 755
 
 # GAMEDIR also appears in config.h as "HACKDIR".
 #
@@ -32,13 +32,16 @@ DIRPERM  = 0755
 # therefore there should not be anything in GAMEDIR that you want to keep
 # (if there is, you'll have to do the installation by hand or modify the
 # instructions)
-GAMEDIR  = /usr/games/lib/$(GAME)dir
-SHELLDIR = /usr/games
+GAMEDIR  = $(PREFIX)/usr/lib/games/$(GAME)
+REALGAMEDIR = /usr/lib/games/$(GAME)
+SHELLDIR = $(PREFIX)/usr/games
+REALSHELLDIR = /usr/games
+VARDIR   = $(PREFIX)/var/lib/games/$(GAME)
 
 # per discussion in Install.X11
 VARDATND = 
-# VARDATND = x11tiles pet_mark.xbm
-# VARDATND = x11tiles pet_mark.xbm rip.xpm
+# VARDATND = dat/x11tiles dat/pet_mark.xbm
+# VARDATND = dat/x11tiles dat/pet_mark.xbm dat/rip.xpm
 
 VARDATD = data oracles options quest.dat rumors
 VARDAT = $(VARDATD) $(VARDATND)
@@ -67,7 +70,7 @@ SPEC_LEVS = asmodeus.lev baalz.lev bigrm-?.lev castle.lev 
fakewiz?.lev \
        wizard?.lev astral.lev air.lev earth.lev fire.lev water.lev
 QUEST_LEVS = ?-goal.lev ?-fill?.lev ?-locate.lev ?-start.lev
 
-DATNODLB = $(VARDATND) license
+DATNODLB = $(VARDATND)
 DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD)
 DAT = $(DATNODLB) $(DATDLB)
 
@@ -137,7 +140,7 @@ dofiles:
        $(MAKE) dofiles-$${target-nodlb}
        cp src/$(GAME) $(GAMEDIR)
        -rm -f $(SHELLDIR)/$(GAME)
-       sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
+       sed -e 's;/usr/games/lib/nethackdir;$(REALGAMEDIR);' \
                -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
                < sys/unix/nethack.sh \
                > $(SHELLDIR)/$(GAME)
@@ -150,7 +153,7 @@ dofiles:
        chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
 
 dofiles-dlb: check-dlb
-       ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) )
+       ( cp dat/nhdat $(DATNODLB) $(GAMEDIR) )
 # set up their permissions
        -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \
                        $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \
@@ -182,17 +185,17 @@ update: $(GAME) $(VARDAT) dungeon spec_levs
 
 install: $(GAME) $(VARDAT) dungeon spec_levs
 # set up the directories
-       -mkdir $(SHELLDIR)
+       -mkdir $(SHELLDIR) 
        -rm -rf $(GAMEDIR)
-       -mkdir $(GAMEDIR) $(GAMEDIR)/save
-       -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(GAMEDIR)/save
-       $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(GAMEDIR)/save
-       chmod $(DIRPERM) $(GAMEDIR) $(GAMEDIR)/save
+       -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       chmod $(DIRPERM) $(GAMEDIR) $(VARDIR)/save
 # set up the game files
        ( $(MAKE) dofiles )
 # set up some additional files
-       touch $(GAMEDIR)/perm $(GAMEDIR)/record $(GAMEDIR)/logfile
-       -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
+       touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
+       -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
                        $(CHGRP) $(GAMEGRP) perm record logfile ; \
                        chmod $(FILEPERM) perm record logfile )
 # and a reminder
diff --git a/dat/Makefile b/dat/Makefile
new file mode 100644
index 0000000..61e39f1
--- /dev/null
+++ b/dat/Makefile
@@ -0,0 +1,87 @@
+#      NetHack Makefile.
+#      SCCS Id: @(#)Makefile.dat       3.2     92/09/18
+
+VARDAT = data rumors quest.dat oracles options
+
+all:   $(VARDAT) spec_levs quest_levs dungeon
+
+../util/makedefs:
+       (cd ../util ; make makedefs)
+
+../util/dgn_comp:
+       (cd ../util ; make dgn_comp)
+
+../util/lev_comp:
+       (cd ../util ; make lev_comp)
+
+../util/tile2x11:
+       (cd ../util ; make tile2x11)
+
+x11tiles: ../util/tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \
+                               ../win/share/other.txt
+       ../util/tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \
+                               ../win/share/other.txt
+
+pet_mark.xbm: ../win/X11/pet_mark.xbm
+       cp ../win/X11/pet_mark.xbm pet_mark.xbm
+
+rip.xpm: ../win/X11/rip.xpm
+       cp ../win/X11/rip.xpm rip.xpm
+
+
+data:  data.base ../util/makedefs
+       ../util/makedefs -d
+
+rumors:        rumors.tru rumors.fal ../util/makedefs
+       ../util/makedefs -r
+
+quest.dat:     quest.txt ../util/makedefs
+       ../util/makedefs -q
+
+oracles:       oracles.txt ../util/makedefs
+       ../util/makedefs -h
+
+# note: 'options' should have already been made when include/date.h was created
+options:       ../util/makedefs
+       ../util/makedefs -v
+
+
+spec_levs: ../util/lev_comp \
+       bigroom.des castle.des endgame.des gehennom.des knox.des medusa.des \
+       mines.des oracle.des tower.des yendor.des
+       ../util/lev_comp bigroom.des
+       ../util/lev_comp castle.des
+       ../util/lev_comp endgame.des
+       ../util/lev_comp gehennom.des
+       ../util/lev_comp knox.des
+       ../util/lev_comp medusa.des
+       ../util/lev_comp mines.des
+       ../util/lev_comp oracle.des
+       ../util/lev_comp tower.des
+       ../util/lev_comp yendor.des
+       touch spec_levs
+
+quest_levs: ../util/lev_comp \
+       Arch.des Barb.des Caveman.des Elf.des Healer.des Knight.des \
+       Priest.des Rogue.des Samurai.des Tourist.des Valkyrie.des Wizard.des
+       ../util/lev_comp Arch.des
+       ../util/lev_comp Barb.des
+       ../util/lev_comp Caveman.des
+       ../util/lev_comp Elf.des
+       ../util/lev_comp Healer.des
+       ../util/lev_comp Knight.des
+       ../util/lev_comp Priest.des
+       ../util/lev_comp Rogue.des
+       ../util/lev_comp Samurai.des
+       ../util/lev_comp Tourist.des
+       ../util/lev_comp Valkyrie.des
+       ../util/lev_comp Wizard.des
+       touch quest_levs
+
+dungeon: dungeon.def ../util/makedefs ../util/dgn_comp
+       ../util/makedefs -e
+       ../util/dgn_comp dungeon.pdf
+
+spotless:
+       -rm -f spec_levs quest_levs *.lev $(VARDAT) dungeon dungeon.pdf
+       -rm -f nhdat x11tiles pet_mark.xbm rip.xpm
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0051d5f
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,10 @@
+nethack (3.2.1-1) unstable; urgency=low
+
+  * New maintainer
+  * Initial release
+
+ -- Paul Haggart <[email protected]>  Sun, 27 Oct 1996 05:56:48 -0500
+
+Local variables:
+mode: debian-changelog
+End:
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..e3c0b37
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,23 @@
+Source: nethack
+Section: games
+Priority: optional
+Maintainer: Paul Haggart <[email protected]>
+Standards-Version: 2.1.0.0
+
+Package: nethack
+Architecture: any
+Depends: libc5 (>= 5.4.7-1), ncurses3.0 (>= 1.9.9e-1)
+Description: console mode dungeon exploration game
+ Nethack is a single-user, fantasy role-playing computer game, a direct
+ descendant of the games Hack and Rogue.  Nethack is a -very- complex game,
+ compared to ones such as Moria, Rogue, or Angband.  There are several
+ different character classes, a larger variety of items (from keys to
+ artifacts), a leaner, meaner collection of monsters, and several quests that
+ a player must finish before winning the game.  There are also many new
+ dungeon features as well as interesting and quite amusing things that a
+ player can do.
+ .
+ Much of the Dungeons of Doom within Nethack is borrowed from several fantasy
+ genres, including Tolkien's Middle Earth, King Aurthor, and Dungeons and 
+ Dragons, as well as a few small references to Star Trek, Doctor Who, and the
+ Hitchhiker's Guide to the Galaxy.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..7899258
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,103 @@
+This package was debianized by Paul Haggart <[email protected]> on
+Sun, 27 Oct 1996 05:56:48 -0500.
+
+It was downloaded from ftp://ftp.win.tue.nl/pub/games/nethack/
+
+Copyright:
+
+                    NETHACK GENERAL PUBLIC LICENSE
+                    (Copyright 1989 M. Stephenson)
+
+               (Based on the BISON general public license,
+                   copyright 1988 Richard M. Stallman)
+
+ Everyone is permitted to copy and distribute verbatim copies of this
+ license, but changing it is not allowed.  You can also use this wording to
+ make the terms for other programs.
+
+  The license agreements of most software companies keep you at the mercy of
+those companies.  By contrast, our general public license is intended to give
+everyone the right to share NetHack.  To make sure that you get the rights we
+want you to have, we need to make restrictions that forbid anyone to deny you
+these rights or to ask you to surrender the rights.  Hence this license
+agreement.
+
+  Specifically, we want to make sure that you have the right to give away
+copies of NetHack, that you receive source code or else can get it if you
+want it, that you can change NetHack or use pieces of it in new free
+programs, and that you know you can do these things.
+
+  To make sure that everyone has such rights, we have to forbid you to
+deprive anyone else of these rights.  For example, if you distribute copies
+of NetHack, you must give the recipients all the rights that you have.  You
+must make sure that they, too, receive or can get the source code.  And you
+must tell them their rights.
+
+  Also, for our own protection, we must make certain that everyone finds out
+that there is no warranty for NetHack.  If NetHack is modified by someone
+else and passed on, we want its recipients to know that what they have is
+not what we distributed.
+
+  Therefore we (Mike Stephenson and other holders of NetHack copyrights) make
+the following terms which say what you must do to be allowed to distribute or
+change NetHack.
+
+
+                        COPYING POLICIES
+
+  1. You may copy and distribute verbatim copies of NetHack source code as
+you receive it, in any medium, provided that you keep intact the notices on
+all files that refer to copyrights, to this License Agreement, and to the
+absence of any warranty; and give any other recipients of the NetHack
+program a copy of this License Agreement along with the program.
+
+  2. You may modify your copy or copies of NetHack or any portion of it, and
+copy and distribute such modifications under the terms of Paragraph 1 above
+(including distributing this License Agreement), provided that you also do the
+following:
+
+    a) cause the modified files to carry prominent notices stating that you
+    changed the files and the date of any change; and
+
+    b) cause the whole of any work that you distribute or publish, that in
+    whole or in part contains or is a derivative of NetHack or any part
+    thereof, to be licensed at no charge to all third parties on terms
+    identical to those contained in this License Agreement (except that you
+    may choose to grant more extensive warranty protection to some or all
+    third parties, at your option)
+
+    c) You may charge a distribution fee for the physical act of
+    transferring a copy, and you may at your option offer warranty protection
+    in exchange for a fee.
+
+  3. You may copy and distribute NetHack (or a portion or derivative of it,
+under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 1 and 2 above provided that you also do one of the following:
+
+    a) accompany it with the complete machine-readable source code, which
+    must be distributed under the terms of Paragraphs 1 and 2 above; or,
+
+    b) accompany it with full information as to how to obtain the complete
+    machine-readable source code from an appropriate archive site.  (This
+    alternative is allowed only for noncommercial distribution.)
+
+For these purposes, complete source code means either the full source
+distribution as originally released over Usenet or updated copies of the
+files in this distribution used to create the object code or executable.
+
+  4. You may not copy, sublicense, distribute or transfer NetHack except as
+expressly provided under this License Agreement.  Any attempt otherwise to
+copy, sublicense, distribute or transfer NetHack is void and your rights to
+use the program under this License agreement shall be automatically
+terminated.  However, parties who have received computer software programs
+from you with this License Agreement will not have their licenses terminated
+so long as such parties remain in full compliance.
+
+
+Stated plainly:  You are prohibited by the terms of this License Agreement
+from using NetHack for gainful purposes.  You are permitted to modify
+NetHack, or otherwise use parts of NetHack, provided that you comply with
+the conditions specified above; in particular, your modified NetHack or
+program containing parts of NetHack must remain freely available as provided
+in this License Agreement.  In other words, go ahead and share NetHack, but
+don't try to stop anyone else from sharing it farther.
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b438f17
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,47 @@
+#!/usr/bin/make -f
+
+package=nethack
+
+build:
+       $(checkdir)
+       make
+       touch build
+
+clean:
+       $(checkdir)
+       -rm -f build
+       make spotless
+       -rm -rf *~ debian/tmp debian/*~ debian/files*
+
+binary-indep:  checkroot build
+       $(checkdir)
+# There are no architecture-independent files to be uploaded
+
+binary-arch:   checkroot build
+       $(checkdir)
+       -rm -rf debian/tmp
+       install -d debian/tmp/usr/games debian/tmp/usr/lib/games/nethack 
+       install -d debian/tmp/var/lib/games/nethack
+       make install PREFIX=debian/tmp
+# Must have debmake installed for this to work. Otherwise please copy
+# /usr/bin/debstd into the debian directory and change debstd to debian/debstd
+       debstd $(package) doc/Guidebook.txt
+       dpkg-gencontrol
+       dpkg --build debian/tmp ..
+
+define checkdir
+       test -f debian/rules
+endef
+
+# Below here is fairly generic really
+
+binary:                binary-indep binary-arch
+
+source diff:
+       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+checkroot:
+       $(checkdir)
+       test root = "`whoami`"
+
+.PHONY: binary binary-arch binary-indep clean checkroot
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..d2bb009
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,85 @@
+#      NetHack Makefile.
+#      SCCS Id: @(#)Makefile.doc       3.2     96/03/23
+
+GUIDEBOOK = Guidebook          # regular ASCII file
+#GUIDEBOOK = Guidebook.ps      # PostScript file
+#GUIDEBOOK = Guidebook.dvi     # TeX device-independent file
+
+# Some versions of col need -x to keep them from converting spaces to tabs;
+# some versions of col don't do the conversion by default and don't
+# recognize the option.  Sigh.
+COLCMD = col -bx
+#COLCMD = col -b
+
+# Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed
+# GUIDECMD = cat Guidebook.txt
+GUIDECMD = tbl tmac.n Guidebook.mn | nroff | $(COLCMD)
+
+# the basic guidebook
+Guidebook:     Guidebook.mn
+       $(GUIDECMD) > Guidebook
+
+# Fancier output for those with ditroff, psdit and a PostScript printer.
+Guidebook.ps:  Guidebook.mn
+       tbl tmac.n Guidebook.mn | ditroff | psdit > Guidebook.ps
+
+# Guidebook.tex is the same as Guidebook.mn but formatted with LaTeX.
+# - The invocation command for LaTeX may vary in different installations.
+# - To print Guidebook.dvi you need to use a suitable dvi-driver.
+Guidebook.dvi: Guidebook.tex
+       latex Guidebook.tex
+
+
+GAME   = nethack
+MANDIR = /usr/man/man6
+MANEXT = 6
+
+# manual installation for most BSD-style systems
+GAMEMANCREATE = cp nethack.6
+LEVMANCREATE = cp lev_comp.6
+DGNMANCREATE = cp dgn_comp.6
+RCVRMANCREATE = cp recover.6
+DLBMANCREATE = cp dlb.6
+# manual installation for most SYSV-style systems
+# GAMEMANCREATE = nroff -man nethack.6 >
+# LEVMANCREATE = nroff -man lev_comp.6 >
+# DGNMANCREATE = nroff -man dgn_comp.6 >
+# RCVRMANCREATE = nroff -man recover.6 >
+# DLBMANCREATE = nroff -man dlb.6 >
+
+manpages:
+       -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
+       -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
+       -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
+       -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
+       -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
+
+# manual creation for distribution
+DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt 
dlb.txt
+
+distrib: $(DISTRIB)
+       @echo "Plain text documentation is up to date."
+
+Guidebook.txt  : Guidebook.mn tmac.n
+       tbl tmac.n Guidebook.mn | nroff | $(COLCMD) > Guidebook.txt
+nethack.txt    : nethack.6
+       nroff -man nethack.6 | $(COLCMD) > nethack.txt
+lev_comp.txt   : lev_comp.6
+       nroff -man lev_comp.6 | $(COLCMD) > lev_comp.txt
+dgn_comp.txt   : dgn_comp.6
+       nroff -man dgn_comp.6 | $(COLCMD) > dgn_comp.txt
+recover.txt    : recover.6
+       nroff -man recover.6 | $(COLCMD) > recover.txt
+dlb.txt                : dlb.6
+       nroff -man dlb.6 | $(COLCMD) > dlb.txt
+
+
+clean:
+       -rm -f Guidebook.aux Guidebook.log
+
+spotless: clean
+       -rm -f Guidebook Guidebook.ps Guidebook.dvi
+
+maintainer-clean: spotless
+       -rm -f $(DISTRIB)
+#      -rm -f Makefile
diff --git a/include/config.h b/include/config.h
index e70d865..013c8b1 100644
--- a/include/config.h
+++ b/include/config.h
@@ -270,15 +270,20 @@
 
 #ifndef WIZARD         /* allow for compile-time or Makefile changes */
 # ifndef KR1ED
-#  define WIZARD  "wizard" /* the person allowed to use the -D option */
+#  define WIZARD  "root" /* the person allowed to use the -D option */
 # else
 #  define WIZARD
 #  define WIZARD_NAME "wizard"
 # endif
 #endif
 
+#ifdef DEBIAN
+#define LOGFILE "/var/lib/games/nethack/logfile"
+#define NEWS "/var/lib/games/nethack/news"
+#else
 #define LOGFILE "logfile"      /* larger file for debugging purposes */
 #define NEWS "news"            /* the file containing the latest hack news */
+#endif
 
 /*
  *     If COMPRESS is defined, it should contain the full path name of your
@@ -295,12 +300,12 @@
 
 #ifdef UNIX
 /* path and file name extension for compression program */
-# define COMPRESS "/usr/ucb/compress"       /* Lempel-Ziv compression */
-# define COMPRESS_EXTENSION ".Z"            /* compress's extension */
+/* # define COMPRESS "/usr/ucb/compress"     /* Lempel-Ziv compression */
+/* # define COMPRESS_EXTENSION ".Z"         /* compress's extension */
 
 /* An example of one alternative you might want to use: */
-/* # define COMPRESS "/usr/local/bin/gzip"   /* FSF gzip compression */
-/* # define COMPRESS_EXTENSION ".gz"        /* normal gzip extension */
+# define COMPRESS "/bin/gzip"   /* FSF gzip compression */
+# define COMPRESS_EXTENSION ".gz"           /* normal gzip extension */
 #endif
 #ifndef COMPRESS
 # define INTERNAL_COMP /* control use of NetHack's compression routines */
@@ -311,7 +316,7 @@
  *     a tar-like file, thus making a neater installation.  See *conf.h
  *     for detailed configuration.
  */
-/* #define DLB         /* not supported on all platforms */
+#define DLB            /* not supported on all platforms */
 
 /*
  *     Defining INSURANCE slows down level changes, but allows games that
@@ -330,7 +335,7 @@
  * otherwise it will be the current directory.
  */
 # ifndef HACKDIR
-#  define HACKDIR "/usr/games/lib/nethackdir"  /* nethack directory */
+#  define HACKDIR "/usr/lib/games/nethack"     /* nethack directory */
 # endif
 
 /*
@@ -340,7 +345,7 @@
  * since the user might create files in a directory of his choice.
  * Of course SECURE is meaningful only if HACKDIR is defined.
  */
-/* #define SECURE      /* do setuid(getuid()) after chdir() */
+#define SECURE /* do setuid(getuid()) after chdir() */
 
 /*
  * If it is desirable to limit the number of people that can play Hack
@@ -464,7 +469,7 @@ typedef unsigned char       uchar;
 #endif
 
 #define EXP_ON_BOTL    /* Show experience on bottom line */
-/* #define SCORE_ON_BOTL       /* added by Gary Erickson (erickson@ucivax) */
+#define SCORE_ON_BOTL  /* added by Gary Erickson (erickson@ucivax) */
 
 #include "global.h"    /* Define everything else according to choices above */
 
diff --git a/include/global.h b/include/global.h
index 2daa2df..a2b4ae4 100644
--- a/include/global.h
+++ b/include/global.h
@@ -14,7 +14,12 @@
  * Files expected to exist in the playground directory.
  */
 
+#ifdef DEBIAN
+#define RECORD         "/var/lib/games/nethack/record"
+#else
 #define RECORD         "record"  /* a file containing list of topscorers */
+#endif
+
 #define HELP           "help"    /* a file containing command descriptions */
 #define SHELP          "hh"            /* abbreviated form of the same */
 #define DEBUGHELP      "wizhelp"       /* a file containing debug mode cmds */
diff --git a/include/unixconf.h b/include/unixconf.h
index bbf7140..02f0557 100644
--- a/include/unixconf.h
+++ b/include/unixconf.h
@@ -33,8 +33,8 @@
 /* #define SVR4                /* use in addition to SYSV for System V Release 
4 */
 #define NETWORK                /* if running on a networked system */
                        /* e.g. Suns sharing a playground through NFS */
-#define SUNOS4 /* SunOS 4.x */
-/* #define LINUX       /* Another Unix clone */
+/* #define SUNOS4      /* SunOS 4.x */
+#define LINUX  /* Another Unix clone */
 /* #define GENIX       /* Yet Another Unix Clone */
 /* #define HISX                /* Bull Unix for XPS Machines */
 /* #define BOS         /* Bull Open Software - Unix for DPX/2 Machines */
@@ -42,7 +42,7 @@
 /* #define AIX_31      /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
                         * job control (note that AIX is SYSV otherwise)
                         * Also define this for AIX 3.2 */
-/* #define TEXTCOLOR   /* Use System V r3.2 terminfo color support */
+#define TEXTCOLOR      /* Use System V r3.2 terminfo color support */
                        /* and/or ANSI color support on termcap systems */
                        /* and/or X11 color */
 /* #define POSIX_JOB_CONTROL   /* use System V / POSIX job control
@@ -241,7 +241,11 @@
 #include <time.h>
 #endif
 
+#ifdef DEBIAN
+#define HLOCK  "/var/lib/games/nethack/perm"   /* an empty file used for 
locking purposes */
+#else
 #define HLOCK  "perm"  /* an empty file used for locking purposes */
+#endif
 
 #ifndef REDO
 #define Getchar nhgetch
diff --git a/sys/unix/Makefile.src b/src/Makefile
similarity index 99%
copy from sys/unix/Makefile.src
copy to src/Makefile
index 9a02953..3c56075 100644
--- a/sys/unix/Makefile.src
+++ b/src/Makefile
@@ -56,7 +56,7 @@ SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o
 #      if you get setcgtty() warnings during execution, you are feeding gcc
 #              a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
 #              -traditional in CFLAGS
-# CC = gcc
+CC = gcc
 #
 #      For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
 #
@@ -109,7 +109,7 @@ SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o
 
 # flags for Linux
 #   compile normally
-# CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
+CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include -DDEBIAN
 #   OR compile backwards compatible a.out format
 # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include 
-I/usr/X11/include
 # LFLAGS = -b i486-linuxaout -L/usr/X11/lib
@@ -123,8 +123,8 @@ SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -O -I../include
-LFLAGS = 
+#CFLAGS = -O -I../include
+#LFLAGS = 
 
 
 # Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
@@ -160,7 +160,8 @@ WINOBJ = $(WINTTYOBJ)
 # WINTTYLIB = -ltermcap
 # WINTTYLIB = -lcurses
 # WINTTYLIB = -lcurses16
-WINTTYLIB = -ltermlib
+# WINTTYLIB = -ltermlib
+WINTTYLIB = -lncurses
 #
 # libraries for X11
 # If USE_XPM is defined in config.h, you will also need -lXpm here.
diff --git a/src/files.c b/src/files.c
index 85f448b..3e8bf0e 100644
--- a/src/files.c
+++ b/src/files.c
@@ -33,14 +33,19 @@ extern int errno;
 char bones[FILENAME];          /* pathname of bones files */
 char lock[FILENAME];           /* pathname of level files */
 #else
-# ifdef VMS
+#ifdef DEBIAN
+char bones[] = "/var/lib/games/nethack/bonesnn.xxx";
+char lock[256] = "/var/lib/games/nethack/1lock";
+#else
+#ifdef VMS
 char bones[] = "bonesnn.xxx;1";
 char lock[PL_NSIZ+17] = "1lock"; /* long enough for _uid+name+.99;1 */
-# else
+#else
 char bones[] = "bonesnn.xxx";
 char lock[PL_NSIZ+14] = "1lock"; /* long enough for uid+name+.99 */
-# endif        /* VMS */
-#endif /* MFLOPPY */
+#  endif /* VMS */
+# endif  /* DEBIAN */
+#endif  /* MFLOPPY */
 
 #if defined(UNIX) || defined(__beos__)
 #define SAVESIZE       (PL_NSIZ + 13)  /* save/99999player.e */
@@ -426,8 +431,13 @@ set_savefile_name()
        }
        Strcat(SAVEF, ".sav");
 # else
+#  ifdef DEBIAN
+       Sprintf(SAVEF, "/var/lib/games/nethack/save/%d%s", (int)getuid(), 
plname);
+       regularize(SAVEF+28);   /* avoid . or / in name */
+#  else
        Sprintf(SAVEF, "save/%d%s", (int)getuid(), plname);
        regularize(SAVEF+5);    /* avoid . or / in name */
+#  endif /* DEBIAN */
 # endif        /* MICRO */
 #endif /* VMS */
 }
diff --git a/src/mail.c b/src/mail.c
index ba60d03..5cf1024 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -439,7 +439,11 @@ struct obj *otmp;
        "Only Amiga makes it possible.",
        "CATS have all the answers.",
 #endif
+#ifdef DEBIAN
+       "Report bugs to [email protected]"
+#else
        "Report bugs to [email protected]"
+#endif
        };
 
        pline("It reads:  \"%s\"", junk[rn2(SIZE(junk))]);
diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src
index 9a02953..3c56075 100644
--- a/sys/unix/Makefile.src
+++ b/sys/unix/Makefile.src
@@ -56,7 +56,7 @@ SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o
 #      if you get setcgtty() warnings during execution, you are feeding gcc
 #              a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
 #              -traditional in CFLAGS
-# CC = gcc
+CC = gcc
 #
 #      For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
 #
@@ -109,7 +109,7 @@ SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o
 
 # flags for Linux
 #   compile normally
-# CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
+CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include -DDEBIAN
 #   OR compile backwards compatible a.out format
 # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include 
-I/usr/X11/include
 # LFLAGS = -b i486-linuxaout -L/usr/X11/lib
@@ -123,8 +123,8 @@ SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -O -I../include
-LFLAGS = 
+#CFLAGS = -O -I../include
+#LFLAGS = 
 
 
 # Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
@@ -160,7 +160,8 @@ WINOBJ = $(WINTTYOBJ)
 # WINTTYLIB = -ltermcap
 # WINTTYLIB = -lcurses
 # WINTTYLIB = -lcurses16
-WINTTYLIB = -ltermlib
+# WINTTYLIB = -ltermlib
+WINTTYLIB = -lncurses
 #
 # libraries for X11
 # If USE_XPM is defined in config.h, you will also need -lXpm here.
diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top
index 56de355..816a4c9 100644
--- a/sys/unix/Makefile.top
+++ b/sys/unix/Makefile.top
@@ -20,10 +20,10 @@ GAMEGRP  = bin
 
 # Permissions - some places use setgid instead of setuid, for instance
 # See also the option "SECURE" in include/config.h
-GAMEPERM = 04755
-FILEPERM = 0644
-EXEPERM  = 0755
-DIRPERM  = 0755
+GAMEPERM = 4755
+FILEPERM = 644
+EXEPERM  = 755
+DIRPERM  = 755
 
 # GAMEDIR also appears in config.h as "HACKDIR".
 #
@@ -32,8 +32,9 @@ DIRPERM  = 0755
 # therefore there should not be anything in GAMEDIR that you want to keep
 # (if there is, you'll have to do the installation by hand or modify the
 # instructions)
-GAMEDIR  = /usr/games/lib/$(GAME)dir
+GAMEDIR  = /usr/lib/games/$(GAME)
 SHELLDIR = /usr/games
+VARDIR   = /var/lib/games/$(GAME)
 
 # per discussion in Install.X11
 VARDATND = 
@@ -182,17 +183,17 @@ update: $(GAME) $(VARDAT) dungeon spec_levs
 
 install: $(GAME) $(VARDAT) dungeon spec_levs
 # set up the directories
-       -mkdir $(SHELLDIR)
+       -mkdir $(SHELLDIR) 
        -rm -rf $(GAMEDIR)
-       -mkdir $(GAMEDIR) $(GAMEDIR)/save
-       -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(GAMEDIR)/save
-       $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(GAMEDIR)/save
-       chmod $(DIRPERM) $(GAMEDIR) $(GAMEDIR)/save
+       -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       chmod $(DIRPERM) $(GAMEDIR) $(VARDIR)/save
 # set up the game files
        ( $(MAKE) dofiles )
 # set up some additional files
-       touch $(GAMEDIR)/perm $(GAMEDIR)/record $(GAMEDIR)/logfile
-       -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
+       touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
+       -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
                        $(CHGRP) $(GAMEGRP) perm record logfile ; \
                        chmod $(FILEPERM) perm record logfile )
 # and a reminder
diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl
index aa09dce..0dd4655 100644
--- a/sys/unix/Makefile.utl
+++ b/sys/unix/Makefile.utl
@@ -15,7 +15,7 @@
 
 # if you are using gcc as your compiler,
 #      uncomment the CC definition below if it's not in your environment
-# CC = gcc
+CC = gcc
 #
 #      For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
 #
@@ -64,7 +64,7 @@
 
 # flags for Linux
 #   compile normally
-# CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
+CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
 #   OR compile backwards compatible a.out format
 # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include 
-I/usr/X11/include
 # LFLAGS = -b i486-linuxaout -L/usr/X11/lib
@@ -77,17 +77,17 @@
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -O -I../include
-LFLAGS =
+#CFLAGS = -O -I../include
+#LFLAGS =
  
 
 # yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
 # if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
-YACC     = yacc
-LEX      = lex
-# YACC     = bison -y
+# YACC     = yacc
+# LEX      = lex
+YACC     = bison -y
 # YACC     = byacc
-# LEX      = flex
+LEX      = flex
  
 # these are the names of the output files from YACC/LEX. Under MS-DOS
 # and similar systems, they may differ
diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c
index cf176fa..ed140fb 100644
--- a/sys/unix/unixmain.c
+++ b/sys/unix/unixmain.c
@@ -174,11 +174,19 @@ char *argv[];
                (void) signal(SIGQUIT,SIG_IGN);
                (void) signal(SIGINT,SIG_IGN);
                if(!locknum)
+#ifdef DEBIAN
+                       Sprintf(lock, "/var/lib/games/nethack/%d%s", 
(int)getuid(), plname);
+#else 
                        Sprintf(lock, "%d%s", (int)getuid(), plname);
+#endif
                getlock();
 #ifdef WIZARD
        } else {
+#ifdef DEBIAN
+               Sprintf(lock, "/var/lib/games/nethack/%d%s", (int)getuid(), 
plname);
+#else
                Sprintf(lock, "%d%s", (int)getuid(), plname);
+#endif
                getlock();
        }
 #endif /* WIZARD /**/
diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c
index 10a3438..b564b57 100644
--- a/sys/unix/unixunix.c
+++ b/sys/unix/unixunix.c
@@ -181,15 +181,22 @@ getlock()
                error("%s", "");
        }
 
+#ifdef DEBIAN
+       regularize(lock + 23);
+#else
        regularize(lock);
+#endif
        set_levelfile_name(lock, 0);
 
        if(locknum) {
                if(locknum > 25) locknum = 25;
 
                do {
+#ifdef DEBIAN
+                       lock[23] = 'a' + i++;
+#else
                        lock[0] = 'a' + i++;
-
+#endif
                        if((fd = open(lock, 0)) == -1) {
                            if(errno == ENOENT) goto gotlock; /* no such file */
                            perror(lock);
diff --git a/sys/unix/Makefile.utl b/util/Makefile
similarity index 98%
copy from sys/unix/Makefile.utl
copy to util/Makefile
index aa09dce..0dd4655 100644
--- a/sys/unix/Makefile.utl
+++ b/util/Makefile
@@ -15,7 +15,7 @@
 
 # if you are using gcc as your compiler,
 #      uncomment the CC definition below if it's not in your environment
-# CC = gcc
+CC = gcc
 #
 #      For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
 #
@@ -64,7 +64,7 @@
 
 # flags for Linux
 #   compile normally
-# CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
+CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
 #   OR compile backwards compatible a.out format
 # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include 
-I/usr/X11/include
 # LFLAGS = -b i486-linuxaout -L/usr/X11/lib
@@ -77,17 +77,17 @@
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -O -I../include
-LFLAGS =
+#CFLAGS = -O -I../include
+#LFLAGS =
  
 
 # yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
 # if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
-YACC     = yacc
-LEX      = lex
-# YACC     = bison -y
+# YACC     = yacc
+# LEX      = lex
+YACC     = bison -y
 # YACC     = byacc
-# LEX      = flex
+LEX      = flex
  
 # these are the names of the output files from YACC/LEX. Under MS-DOS
 # and similar systems, they may differ

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/nethack.git

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to