fix make install; fix the package directory tree
This commit is contained in:
@@ -46,7 +46,7 @@ endif # WANT_WIN_QT
|
|||||||
# administered this may not be what you (or your admin) want.
|
# administered this may not be what you (or your admin) want.
|
||||||
# Consider a non-shared install (WANT_SHARE_INSTALL=0) instead.
|
# Consider a non-shared install (WANT_SHARE_INSTALL=0) instead.
|
||||||
# - 'make install' must be run as "sudo make install"
|
# - 'make install' must be run as "sudo make install"
|
||||||
#WANT_SHARE_INSTALL=1
|
WANT_SHARE_INSTALL=1
|
||||||
GAMEUID = $(USER)
|
GAMEUID = $(USER)
|
||||||
GAMEGRP = games
|
GAMEGRP = games
|
||||||
# build to run in the source tree - primarily for development. Build with "make all"
|
# build to run in the source tree - primarily for development. Build with "make all"
|
||||||
@@ -143,7 +143,7 @@ GAMEPERM = 02755
|
|||||||
else # ! root
|
else # ! root
|
||||||
PREFIX:=/Users/$(GAMEUID)
|
PREFIX:=/Users/$(GAMEUID)
|
||||||
SHELLDIR=$(PREFIX)/bin
|
SHELLDIR=$(PREFIX)/bin
|
||||||
HACKDIR=$(PREFIX)/nethackdir
|
HACKDIR=$(PREFIX)/Library/NetHack/nethackdir
|
||||||
CHOWN=/usr/bin/true
|
CHOWN=/usr/bin/true
|
||||||
CHGRP=/usr/bin/true
|
CHGRP=/usr/bin/true
|
||||||
GAMEPERM = 0500
|
GAMEPERM = 0500
|
||||||
@@ -186,6 +186,9 @@ POSTINSTALL+= cp -n sys/unix/sysconf $(HACKDIR)/sysconf; $(CHOWN) $(GAMEUID) $(H
|
|||||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||||
endif # !WANT_SOURCE_INSTALL
|
endif # !WANT_SOURCE_INSTALL
|
||||||
|
|
||||||
|
INSTDIR=$(HACKDIR)
|
||||||
|
VARDIR=$(HACKDIR)
|
||||||
|
|
||||||
|
|
||||||
# ~/Library/Preferences/NetHack Defaults
|
# ~/Library/Preferences/NetHack Defaults
|
||||||
# OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
|
# OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
|
||||||
@@ -211,8 +214,9 @@ PKGR=productbuild
|
|||||||
SVS=$(shell $(NHSROOT)/util/makedefs --svs)
|
SVS=$(shell $(NHSROOT)/util/makedefs --svs)
|
||||||
SVSDOT=$(shell $(NHSROOT)/util/makedefs --svs .)
|
SVSDOT=$(shell $(NHSROOT)/util/makedefs --svs .)
|
||||||
|
|
||||||
PKGROOT_UG = PKGROOT/usr/local/games
|
PKGROOT_UG = PKGROOT/$(PREFIX)
|
||||||
PKGROOT_UGLN = PKGROOT/usr/local/games/lib/nethackdir
|
PKGROOT_UGLN = PKGROOT/$(HACKDIR)
|
||||||
|
PKGROOT_BIN = PKGROOT/$(SHELLDIR)
|
||||||
build_tty_pkg:
|
build_tty_pkg:
|
||||||
ifneq (,$(WANT_WIN_X11)$(WANT_WIN_QT))
|
ifneq (,$(WANT_WIN_X11)$(WANT_WIN_QT))
|
||||||
-echo build_tty_pkg only works for a tty-only build
|
-echo build_tty_pkg only works for a tty-only build
|
||||||
@@ -251,10 +255,10 @@ else
|
|||||||
build_package_root:
|
build_package_root:
|
||||||
cd src/.. # make sure we are at TOP
|
cd src/.. # make sure we are at TOP
|
||||||
rm -rf PKGROOT
|
rm -rf PKGROOT
|
||||||
mkdir -p $(PKGROOT_UG)/lib $(PKGROOT_UG)/bin $(PKGROOT_UG)/man/man6 $(PKGROOT_UG)/doc $(PKGROOT_UGLN)
|
mkdir -p $(PKGROOT_UG)/lib $(PKGROOT_BIN) $(PKGROOT_UG)/man/man6 $(PKGROOT_UG)/doc $(PKGROOT_UGLN)
|
||||||
install -p src/nethack $(PKGROOT_UG)/bin
|
install -p src/nethack $(PKGROOT_BIN)
|
||||||
# XXX should this be called nethackrecover?
|
# XXX should this be called nethackrecover?
|
||||||
install -p util/recover $(PKGROOT_UG)/bin
|
install -p util/recover $(PKGROOT_BIN)
|
||||||
install -p doc/nethack.6 $(PKGROOT_UG)/man/man6
|
install -p doc/nethack.6 $(PKGROOT_UG)/man/man6
|
||||||
install -p doc/recover.6 $(PKGROOT_UG)/man/man6
|
install -p doc/recover.6 $(PKGROOT_UG)/man/man6
|
||||||
install -p doc/Guidebook $(PKGROOT_UG)/doc
|
install -p doc/Guidebook $(PKGROOT_UG)/doc
|
||||||
|
|||||||
@@ -6,6 +6,6 @@
|
|||||||
# Display the Guidebook from the GUI.
|
# Display the Guidebook from the GUI.
|
||||||
|
|
||||||
tell application "Finder"
|
tell application "Finder"
|
||||||
open location "file:///usr/local/games/doc/NetHackGuidebook.pdf"
|
open location "file:///Library/Nethack/doc/NetHackGuidebook.pdf"
|
||||||
delay 5
|
delay 5
|
||||||
end tell
|
end tell
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ if not canceled then
|
|||||||
--set lastpos to lastpos + (length of "/nethackdir")
|
--set lastpos to lastpos + (length of "/nethackdir")
|
||||||
--set rawpath to (get text 1 through lastpos of mpath) & "/recover.pl"
|
--set rawpath to (get text 1 through lastpos of mpath) & "/recover.pl"
|
||||||
--set safepath to the quoted form of rawpath
|
--set safepath to the quoted form of rawpath
|
||||||
set safepath to the quoted form of "/usr/local/games/lib/nethackdir/recover.pl"
|
set safepath to the quoted form of "/Library/Nethack/nethackdir/recover.pl"
|
||||||
end considering
|
end considering
|
||||||
do shell script safepath
|
do shell script safepath
|
||||||
display dialog result with title "NetHackRecover Output"
|
display dialog result with title "NetHackRecover Output"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ tell application "Terminal"
|
|||||||
|
|
||||||
activate
|
activate
|
||||||
#open new window and run NetHack in it
|
#open new window and run NetHack in it
|
||||||
do script with command "clear;sleep 1;/usr/local/games/bin/nethack;echo '(press RETURN to exit)';awk '{exit}';exit"
|
do script with command "clear;sleep 1;/usr/local/bin/nethack;echo '(press RETURN to exit)';awk '{exit}';exit"
|
||||||
set nhresult to result -- class is tab
|
set nhresult to result -- class is tab
|
||||||
set nhresrec to result as record
|
set nhresrec to result as record
|
||||||
set nhreslist to result as list
|
set nhreslist to result as list
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ if($try_perm){
|
|||||||
|
|
||||||
# run recover, but only if there is something that looks promising
|
# run recover, but only if there is something that looks promising
|
||||||
$recover = "./recover";
|
$recover = "./recover";
|
||||||
$recover = "/usr/local/games/bin/recover" unless(-e $recover);
|
$recover = "/usr/local/bin/recover" unless(-e $recover);
|
||||||
|
|
||||||
$uid = $<;
|
$uid = $<;
|
||||||
foreach ( <$uid*.0> ){
|
foreach ( <$uid*.0> ){
|
||||||
|
|||||||
Reference in New Issue
Block a user