--- Makefile.orig	2011-02-26 20:51:00.000000000 +0900
+++ Makefile	2011-02-26 14:43:19.000000000 +0900
@@ -14,20 +14,20 @@
 # MAKE = make
 
 # make NetHack
-PREFIX   = /usr
+PREFIX   = /opt
 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 = $(PREFIX)/var/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	2011-02-26 20:51:00.000000000 +0900
+++ doc/Makefile	2011-02-26 14:43:56.000000000 +0900
@@ -53,7 +53,7 @@
 #	tbl tmac.n jGuidebook.mn | groff -Wall -Tdvi > jGuidebook.dvi
 
 GAME    = slashem
-MANDIR	= /usr/man/man6
+MANDIR	= /opt/share/man/man6
 MANEXT	= 6
 FRMANDIR= $(MANDIR:man6=fr/man6)
 
--- include/config.h.orig	2011-02-26 20:47:06.000000000 +0900
+++ include/config.h	2011-02-26 14:44:18.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 "/opt/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/unixconf.h.orig	2011-02-26 20:46:37.000000000 +0900
+++ include/unixconf.h	2011-02-26 17:10:25.000000000 +0900
@@ -26,19 +26,19 @@
 /* #define ULTRIX */	/* define for Ultrix v3.0 or higher (but not lower) */
 			/* Use BSD for < v3.0 */
 			/* "ULTRIX" not to be confused with "ultrix" */
-/* #define SYSV	*/	/* define for System V, Solaris 2.x, newer versions */
+#define SYSV		/* define for System V, Solaris 2.x, newer versions */
 			/* of Linux */
 /* #define HPUX */	/* Hewlett-Packard's Unix, version 6.5 or higher */
 			/* use SYSV for < v6.5 */
 
 
 /* define any of the following that are appropriate */
-#define SVR4		/* use in addition to SYSV for System V Release 4 */
+/* #define SVR4	*/	/* use in addition to SYSV for System V Release 4 */
 			/* including Solaris 2+ */
 #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 LINUX	/* Another Unix clone */
 /* #define CYGWIN32 */	/* Unix on Win32 -- use with case sensitive defines */
 /* #define GENIX */	/* Yet Another Unix Clone */
 /* #define HISX */	/* Bull Unix for XPS Machines */
@@ -48,7 +48,7 @@
 			 * job control (note that AIX is SYSV otherwise)
 			 * Also define this for AIX 3.2 */
 
-/* #define TERMINFO */	/* uses terminfo rather than termcap */
+#define TERMINFO	/* uses terminfo rather than termcap */
 			/* Should be defined for most SYSV, SVR4 (including
 			 * Solaris 2+), HPUX, and Linux systems.  In
 			 * particular, it should NOT be defined for the UNIXPC
@@ -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		"/opt/var/jslashem/"
+#define FILE_AREA_SAVE		"/opt/var/jslashem/save/"
+#define FILE_AREA_SHARE		"/opt/share/jslashem/"
+#define FILE_AREA_UNSHARE	"/opt/lib/jslashemdir/"
+#define FILE_AREA_DOC		"/opt/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	2011-02-26 20:51:00.000000000 +0900
+++ src/Makefile	2011-02-26 20:42:03.000000000 +0900
@@ -147,8 +147,8 @@
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -W -g -O -I../include
-LFLAGS =
+CFLAGS = -W -pipe -Os -I/opt/include/ncursesw -I../include
+LFLAGS = -L/opt/lib -Wl,-rpath=/opt/lib
 
 # Only used for the Gnome interface.
 # When including the Gnome interface, you need to include gnome specific
--- util/Makefile.orig	2011-02-26 20:51:00.000000000 +0900
+++ util/Makefile	2011-02-26 20:42:18.000000000 +0900
@@ -89,7 +89,7 @@
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-CFLAGS = -O -I../include
+CFLAGS = -pipe -Os -I../include
 LFLAGS =
 
 LIBS =
