--- Makefile.orig	2010-01-15 07:14:05.000000000 +0900
+++ Makefile	2010-01-15 12:51:56.000000000 +0900
@@ -14,20 +14,20 @@
 # MAKE = make
 
 # make NetHack
-PREFIX   = /usr
+PREFIX   = /opt/pkg/jslashem-0.0.7E7F3-J0.2.1
 GAME     = jslashem
 # GAME     = slashem.prg
 GAMEUID  = games
-GAMEGRP  = bin
+GAMEGRP  = games
 
 # Permissions - some places use setgid instead of setuid, for instance
 # See also the option "SECURE" in include/config.h
-GAMEPERM = 04755
+GAMEPERM = 02755
 FILEPERM = 0644
 EXEPERM  = 0755
 DIRPERM  = 0755
-VARFILEPERM = 0644
-VARDIRPERM  = 0755
+VARFILEPERM = 0664
+VARDIRPERM  = 0775
 
 # GAMEDIR also appears in config.h as "HACKDIR".
 # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
@@ -40,16 +40,16 @@
 # These must agree with the definitions in unixconf.h
 
 # Defs. for non file areas support.
-GAMEDIR  = $(PREFIX)/local/jslashemdir
-VARDIR = $(GAMEDIR)
+GAMEDIR  = $(PREFIX)/lib/jslashemdir
+VARDIR = /var/opt/jslashem
 FILE_AREA_VAR = $(VARDIR)
 FILE_AREA_SAVE = $(VARDIR)/save
-FILE_AREA_SHARE = $(GAMEDIR)
+FILE_AREA_SHARE = $(PREFIX)/share/jslashem
 FILE_AREA_UNSHARE = $(GAMEDIR)
-FILE_AREA_DOC = $(GAMEDIR)
+FILE_AREA_DOC = $(PREFIX)/share/doc/jslashem
 FILE_AREA_BONES = $(FILE_AREA_VAR)
 FILE_AREA_LEVL = $(FILE_AREA_VAR)
-SHELLDIR = $(PREFIX)/local/bin
+SHELLDIR = $(PREFIX)/bin
 
 # Defs. compatible with Linux's FSSTND 1.2
 # FILE_AREA_VAR = /var/lib/games/slashem
--- doc/Makefile.orig	2010-01-15 07:14:05.000000000 +0900
+++ doc/Makefile	2010-01-15 07:52:58.000000000 +0900
@@ -53,7 +53,7 @@
 #	tbl tmac.n jGuidebook.mn | groff -Wall -Tdvi > jGuidebook.dvi
 
 GAME    = slashem
-MANDIR	= /usr/man/man6
+MANDIR	= /opt/pkg/jslashem-0.0.7E7F3-J0.2.1/share/man/man6
 MANEXT	= 6
 FRMANDIR= $(MANDIR:man6=fr/man6)
 
--- include/config.h.orig	2010-01-15 07:11:56.000000000 +0900
+++ include/config.h	2010-01-15 07:49:12.000000000 +0900
@@ -204,7 +204,7 @@
 
 #ifdef JNETHACK
 /*#define NH_EXTENSION*/	/* Some extension for game */
-# define XI18N
+/*# define XI18N*/
 # define INSTALLCOLORMAP
 #endif
 
@@ -238,12 +238,12 @@
 
 #ifdef UNIX
 /* path and file name extension for compression program */
-# define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
-# define COMPRESS_EXTENSION ".Z"	     /* compress's extension */
+/* # define COMPRESS "/usr/bin/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 "/usr/bin/gzip"   /* FSF gzip compression */
+# define COMPRESS_EXTENSION ".gz"	     /* normal gzip extension */
 
 /* # define COMPRESS "/usr/bin/bzip2"	*//* bzip2 compression */
 /* # define COMPRESS_EXTENSION ".bz2"	*//* bzip2 extension */
--- include/system.h.orig	2010-01-15 07:10:42.000000000 +0900
+++ include/system.h	2010-01-15 07:58:13.000000000 +0900
@@ -81,10 +81,10 @@
 # if !defined(__SC__) && !defined(__CYGWIN__) && !defined(LINUX)
 E  long NDECL(random);
 # endif
-# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) || defined(RANDOM)
+# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__) && !defined(__NetBSD__)) || defined(RANDOM)
 E void FDECL(srandom, (unsigned int));
 # else
-#  if !defined(bsdi) && !defined(LINUX) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
+#  if !defined(bsdi) && !defined(LINUX) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
 E int FDECL(srandom, (unsigned int));
 #  endif
 # endif
--- include/unixconf.h.orig	2010-01-15 07:10:42.000000000 +0900
+++ include/unixconf.h	2010-01-15 07:44:46.000000000 +0900
@@ -20,7 +20,7 @@
  */
 
 /* define exactly one of the following four choices */
-/* #define BSD 1 */	/* define for 4.n/Free/Open/Net BSD  */
+#define BSD 1	/* define for 4.n/Free/Open/Net BSD  */
 			/* also for relatives like SunOS 4.x, DG/UX, and */
 			/* older versions of Linux */
 /* #define ULTRIX */	/* define for Ultrix v3.0 or higher (but not lower) */
@@ -113,7 +113,7 @@
  * FILE_AREA_DOC	For human-readable documentation
  */
 
-/* #define FILE_AREAS */		/* Use file areas */
+#define FILE_AREAS		/* Use file areas */
 
 #ifdef FILE_AREAS
 
@@ -133,11 +133,11 @@
  * File areas compatible with FHS 2.0
  */
 
-#define FILE_AREA_VAR		"/var/games/slashem/"
-#define FILE_AREA_SAVE		"/var/games/slashem/save/"
-#define FILE_AREA_SHARE		"/usr/share/games/slashem/"
-#define FILE_AREA_UNSHARE	"/usr/lib/games/slashem/"
-#define FILE_AREA_DOC		"/usr/share/doc/slashem/"
+#define FILE_AREA_VAR		"/var/opt/jslashem/"
+#define FILE_AREA_SAVE		"/var/opt/jslashem/save/"
+#define FILE_AREA_SHARE		"/opt/pkg/jslashem-0.0.7E7F3-J0.2.1/share/jslashem/"
+#define FILE_AREA_UNSHARE	"/opt/pkg/jslashem-0.0.7E7F3-J0.2.1/lib/jslashemdir/"
+#define FILE_AREA_DOC		"/opt/pkg/jslashem-0.0.7E7F3-J0.2.1/share/doc/jslashem/"
 
 #define FILE_AREA_BONES		FILE_AREA_VAR
 #define FILE_AREA_LEVL		FILE_AREA_VAR
@@ -272,6 +272,7 @@
  * If you have a normal compress, just leave it commented out.
  */
 /* #define COMPRESS_OPTIONS "-q" */
+#define COMPRESS_OPTIONS "-9"
 #endif
 
 #define FCMASK	0660	/* file creation mask */
--- src/Makefile.orig	2010-01-15 07:14:05.000000000 +0900
+++ src/Makefile	2010-01-15 07:55:24.000000000 +0900
@@ -147,7 +147,7 @@
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -W -g -O -I../include
+CFLAGS = -W -Os -I../include
 LFLAGS =
 
 # Only used for the Gnome interface.
@@ -346,10 +346,10 @@
 # Be uses -ltermcap
 #
 # libraries for tty ports
-# WINTTYLIB = -ltermcap
+WINTTYLIB = -ltermcap
 # WINTTYLIB = -lcurses
 # WINTTYLIB = -lcurses16
- WINTTYLIB = -lncurses
+# WINTTYLIB = -lncurses
 # WINTTYLIB = -ltermlib
 #
 # libraries for X11
--- util/Makefile.orig	2010-01-15 07:14:05.000000000 +0900
+++ util/Makefile	2010-01-15 08:11:16.000000000 +0900
@@ -89,7 +89,7 @@
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -O -I../include
+CFLAGS = -Os -I../include
 LFLAGS =
 
 LIBS =
@@ -101,9 +101,9 @@
 
 # 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
+YACC     = yacc
 # LEX      = lex
-YACC     = bison -y
+# YACC     = bison -y
 # YACC     = byacc
 LEX      = flex -8
  
