aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2014-06-29 15:12:44 +0800
committerglewis <glewis@FreeBSD.org>2014-06-29 15:12:44 +0800
commit0b5a8afe20891365dcc267fa71623c04d99e5125 (patch)
tree922761ffffae019eac0decfa3dd3b44c3caa8a96 /games
parent8f62889d984b1728d6710bb4b5ffb352638b9146 (diff)
downloadfreebsd-ports-gnome-0b5a8afe20891365dcc267fa71623c04d99e5125.tar.gz
freebsd-ports-gnome-0b5a8afe20891365dcc267fa71623c04d99e5125.tar.zst
freebsd-ports-gnome-0b5a8afe20891365dcc267fa71623c04d99e5125.zip
. Support staging.
Diffstat (limited to 'games')
-rw-r--r--games/slashem-tty/Makefile18
-rw-r--r--games/slashem-tty/files/patch-makefile.doc24
-rw-r--r--games/slashem-tty/files/patch-makefile.top116
-rw-r--r--games/slashem-tty/pkg-plist28
4 files changed, 154 insertions, 32 deletions
diff --git a/games/slashem-tty/Makefile b/games/slashem-tty/Makefile
index 7f90b825cb3c..0981af871c7c 100644
--- a/games/slashem-tty/Makefile
+++ b/games/slashem-tty/Makefile
@@ -14,30 +14,30 @@ COMMENT= Dungeon explorin', slashin', hackin' game
USES= gmake
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES+= pkg-deinstall
-MAN6= dgn_comp.6 dlb.6 lev_comp.6 recover.6 slashem.6
MAKE_JOBS_UNSAFE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/([A-Z])./\1/g}
MAKE_ENV+= DATADIR="${DATADIR}"
-NO_STAGE= yes
+.include <bsd.port.pre.mk>
+
post-patch:
${REINPLACE_CMD} -e \
"s@%%DATADIR%%@${DATADIR}@g" ${WRKSRC}/include/config.h
-pre-configure:
+do-configure:
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
post-install:
@cd ${WRKSRC}/doc; ${CHMOD} 644 *.6
@(cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \
${MAKEFILE} ${MAKE_ARGS} manpages)
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/slamfaq.txt ${DOCSDIR}
- ${INSTALL_DATA} ${FILESDIR}/sample.slashemrc ${DOCSDIR}
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/slamfaq.txt ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${FILESDIR}/sample.slashemrc ${STAGEDIR}${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/slashem-tty/files/patch-makefile.doc b/games/slashem-tty/files/patch-makefile.doc
index 525d27847fee..09e077f4a3be 100644
--- a/games/slashem-tty/files/patch-makefile.doc
+++ b/games/slashem-tty/files/patch-makefile.doc
@@ -1,7 +1,5 @@
-$FreeBSD$
-
---- sys/unix/Makefile.doc.orig Sat Dec 30 05:08:31 2006
-+++ sys/unix/Makefile.doc Fri Aug 17 23:19:06 2007
+--- sys/unix/Makefile.doc.orig 2006-12-30 05:08:31.000000000 -0800
++++ sys/unix/Makefile.doc 2014-06-28 23:55:59.000000000 -0700
@@ -53,16 +53,16 @@
# tbl tmac.n Guidebook.mn | groff -Wall -Tdvi > Guidebook.dvi
@@ -25,11 +23,21 @@ $FreeBSD$
FRGAMEMANCREATE = cp fr/$(GAME).6
# manual installation for most SYSV-style systems
# and for man files readable in less (eg dos DJGPP+GNU)
-@@ -79,7 +79,6 @@
- -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
+@@ -74,12 +74,11 @@
+ # FRGAMEMANCREATE = groff -Wall -mtty-char -Tutf8 -man fr/$(GAME).6 >
+
+ manpages:
+- -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
+- -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
+- -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
+- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
+- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
- -$(FRGAMEMANCREATE) $(FRMANDIR)/$(GAME).$(MANEXT)
++ -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)/$(GAME).$(MANEXT)
++ -$(LEVMANCREATE) ${DESTDIR}$(MANDIR)/lev_comp.$(MANEXT)
++ -$(DGNMANCREATE) ${DESTDIR}$(MANDIR)/dgn_comp.$(MANEXT)
++ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)/recover.$(MANEXT)
++ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)/dlb.$(MANEXT)
# manual creation for distribution
DISTRIB = Guidebook.txt $(GAME).txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt
diff --git a/games/slashem-tty/files/patch-makefile.top b/games/slashem-tty/files/patch-makefile.top
index 1e365b96c6c0..921bc2e69908 100644
--- a/games/slashem-tty/files/patch-makefile.top
+++ b/games/slashem-tty/files/patch-makefile.top
@@ -1,7 +1,5 @@
-$FreeBSD$
-
---- sys/unix/Makefile.top.orig Sat Dec 30 05:08:31 2006
-+++ sys/unix/Makefile.top Sun Aug 19 01:18:58 2007
+--- sys/unix/Makefile.top.orig 2006-12-30 05:08:31.000000000 -0800
++++ sys/unix/Makefile.top 2014-06-28 23:58:08.000000000 -0700
@@ -14,20 +14,19 @@
# MAKE = make
@@ -45,12 +43,112 @@ $FreeBSD$
# Defs. compatible with Linux's FSSTND 1.2
# FILE_AREA_VAR = /var/lib/games/slashem
-@@ -290,7 +289,7 @@
+@@ -288,60 +287,32 @@
+ -e '}' \
+ -e '$$s/.*/nodlb/p' < dat/options` ; \
$(MAKE) dofiles-$${target-nodlb}
- cp src/$(GAME) $(FILE_AREA_UNSHARE)
- cp util/recover $(FILE_AREA_UNSHARE)
+- cp src/$(GAME) $(FILE_AREA_UNSHARE)
+- cp util/recover $(FILE_AREA_UNSHARE)
- cp dat/license doc/Guidebook.txt $(FILE_AREA_DOC)
-+ cp dat/license $(FILE_AREA_DOC)
++ cp src/$(GAME) ${DESTDIR}$(FILE_AREA_UNSHARE)
++ cp util/recover ${DESTDIR}$(FILE_AREA_UNSHARE)
++ cp dat/license ${DESTDIR}$(FILE_AREA_DOC)
# cp win/Qt/KDE/kslashem.kdelnk $(KDEDIR)/share/applnk/Games
- -rm -f $(SHELLDIR)/$(GAME)
+- -rm -f $(SHELLDIR)/$(GAME)
++ -rm -f ${DESTDIR}$(SHELLDIR)/$(GAME)
sed -e 's;/usr/games/lib/nethackdir;$(FILE_AREA_UNSHARE);' \
+ -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
+ < sys/unix/nethack.sh \
+- > $(SHELLDIR)/$(GAME)
+-# set up their permissions
+- -( cd $(FILE_AREA_UNSHARE) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \
+- $(CHGRP) $(GAMEGRP) $(GAME) recover )
+- chmod $(GAMEPERM) $(FILE_AREA_UNSHARE)/$(GAME)
+- chmod $(EXEPERM) $(FILE_AREA_UNSHARE)/recover
+- -( cd $(FILE_AREA_DOC) ; \
+- $(CHOWN) $(GAMEUID) license Guidebook.txt ; \
+- $(CHGRP) $(GAMEGRP) license Guidebook.txt ; \
+- chmod $(FILEPERM) license Guidebook.txt )
+- -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
+- $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
+- chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
++ > ${DESTDIR}$(SHELLDIR)/$(GAME)
+
+ dofiles-dlb: check-dlb
+- ( cd dat ; cp nhshare $(SHARE_DATNODLB) $(FILE_AREA_SHARE) )
+- ( cd dat ; cp nhushare $(UNSHARE_DATNODLB) $(FILE_AREA_UNSHARE) )
+-# set up their permissions
+- -( cd $(FILE_AREA_SHARE) ; \
+- $(CHOWN) $(GAMEUID) nhshare $(SHARE_DATNODLB) ; \
+- $(CHGRP) $(GAMEGRP) nhshare $(SHARE_DATNODLB) ; \
+- chmod $(FILEPERM) nhshare $(SHARE_DATNODLB) )
+- -( cd $(FILE_AREA_UNSHARE) ; \
+- $(CHOWN) $(GAMEUID) nhushare $(UNSHARE_DATNODLB) ; \
+- $(CHGRP) $(GAMEGRP) nhushare $(UNSHARE_DATNODLB) ; \
+- chmod $(FILEPERM) nhushare $(UNSHARE_DATNODLB) )
++ ( cd dat ; cp nhshare $(SHARE_DATNODLB) ${DESTDIR}$(FILE_AREA_SHARE) )
++ ( cd dat ; cp nhushare $(UNSHARE_DATNODLB) ${DESTDIR}$(FILE_AREA_UNSHARE) )
+
+ dofiles-nodlb:
+ # copy over the game files
+- ( cd dat ; cp $(SHARE_DAT) $(FILE_AREA_SHARE) )
+- ( cd dat ; cp $(UNSHARE_DAT) $(FILE_AREA_UNSHARE) )
+-# set up their permissions
+- -( cd $(FILE_AREA_SHARE) ; $(CHOWN) $(GAMEUID) $(SHARE_DAT) ; \
+- $(CHGRP) $(GAMEGRP) $(SHARE_DAT) ; \
+- chmod $(FILEPERM) $(SHARE_DAT) )
+- -( cd $(FILE_AREA_UNSHARE) ; $(CHOWN) $(GAMEUID) $(UNSHARE_DAT) ; \
+- $(CHGRP) $(GAMEGRP) $(UNSHARE_DAT) ; \
+- chmod $(FILEPERM) $(UNSHARE_DAT) )
++ ( cd dat ; cp $(SHARE_DAT) ${DESTDIR}$(FILE_AREA_SHARE) )
++ ( cd dat ; cp $(UNSHARE_DAT) ${DESTDIR}$(FILE_AREA_UNSHARE) )
+
+ update: $(GAME) recover $(CNF_SHARE_DAT) dungeon spec_levs Guidebook.txt
+ # (don't yank the old version out from under people who're playing it)
+- -mv $(FILE_AREA_UNSHARE)/$(GAME) $(FILE_AREA_UNSHARE)/$(GAME).old
++ -mv ${DESTDIR}$(FILE_AREA_UNSHARE)/$(GAME) ${DESTDIR}$(FILE_AREA_UNSHARE)/$(GAME).old
+ # quest.dat is also kept open and has the same problems over NFS
+ # (quest.dat may be inside nhushare if dlb is in use)
+- -mv $(FILE_AREA_UNSHARE)/quest.dat $(FILE_AREA_UNSHARE)/quest.dat.old
+- -mv $(FILE_AREA_UNSHARE)/nhushare $(FILE_AREA_UNSHARE)/nhushare.old
++ -mv ${DESTDIR}$(FILE_AREA_UNSHARE)/quest.dat ${DESTDIR}$(FILE_AREA_UNSHARE)/quest.dat.old
++ -mv ${DESTDIR}$(FILE_AREA_UNSHARE)/nhushare ${DESTDIR}$(FILE_AREA_UNSHARE)/nhushare.old
+ # set up new versions of the game files
+ ( $(MAKE) dofiles )
+ # touch time-sensitive files
+@@ -354,27 +325,18 @@
+ install: $(GAME) recover $(CNF_SHARE_DAT) dungeon spec_levs Guidebook.txt
+ # set up the directories
+ # not all mkdirs have -p; those that don't will create a -p directory
+- -mkdir -p $(SHELLDIR)
+- -rm -rf $(FILE_AREA_VAR) $(FILE_AREA_BONES) $(FILE_AREA_SAVE)
+- -rm -rf $(FILE_AREA_LEVL) $(FILE_AREA_SHARE) $(FILE_AREA_UNSHARE)
+- -rm -rf $(FILE_AREA_DOC)
+- -mkdir -p $(FILE_AREA_VAR) $(FILE_AREA_BONES) $(FILE_AREA_SAVE)
+- -mkdir -p $(FILE_AREA_LEVL) $(FILE_AREA_SHARE) $(FILE_AREA_UNSHARE)
+- -mkdir -p $(FILE_AREA_DOC)
++ -mkdir -p ${DESTDIR}$(SHELLDIR)
++ -rm -rf ${DESTDIR}$(FILE_AREA_VAR) ${DESTDIR}$(FILE_AREA_BONES) ${DESTDIR}$(FILE_AREA_SAVE)
++ -rm -rf ${DESTDIR}$(FILE_AREA_LEVL) ${DESTDIR}$(FILE_AREA_SHARE) ${DESTDIR}$(FILE_AREA_UNSHARE)
++ -rm -rf ${DESTDIR}$(FILE_AREA_DOC)
++ -mkdir -p ${DESTDIR}$(FILE_AREA_VAR) ${DESTDIR}$(FILE_AREA_BONES)
++ -mkdir -p ${DESTDIR}$(FILE_AREA_LEVL) ${DESTDIR}$(FILE_AREA_SHARE) ${DESTDIR}$(FILE_AREA_UNSHARE)
++ -mkdir -p ${DESTDIR}$(FILE_AREA_DOC)
+ -rmdir ./-p
+- -$(CHOWN) $(GAMEUID) $(FILE_AREA_VAR) $(FILE_AREA_BONES) $(FILE_AREA_SAVE) $(FILE_AREA_LEVL)
+- $(CHGRP) $(GAMEGRP) $(FILE_AREA_VAR) $(FILE_AREA_BONES) $(FILE_AREA_SAVE) $(FILE_AREA_LEVL)
+- chmod $(VARDIRPERM) $(FILE_AREA_VAR) $(FILE_AREA_BONES) $(FILE_AREA_SAVE) $(FILE_AREA_LEVL)
+- -$(CHOWN) $(GAMEUID) $(FILE_AREA_SHARE) $(FILE_AREA_UNSHARE)
+- $(CHGRP) $(GAMEGRP) $(FILE_AREA_SHARE) $(FILE_AREA_UNSHARE)
+- chmod $(DIRPERM) $(FILE_AREA_SHARE) $(FILE_AREA_UNSHARE)
+ # set up the game files
+ ( $(MAKE) dofiles )
+ # set up some additional files
+- touch $(FILE_AREA_VAR)/perm $(FILE_AREA_VAR)/record $(FILE_AREA_VAR)/logfile
+- -( cd $(FILE_AREA_VAR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
+- $(CHGRP) $(GAMEGRP) perm record logfile ; \
+- chmod $(VARFILEPERM) perm record logfile )
++ touch ${DESTDIR}$(FILE_AREA_VAR)/perm ${DESTDIR}$(FILE_AREA_VAR)/record ${DESTDIR}$(FILE_AREA_VAR)/logfile
+ # and a reminder
+ @echo You may also want to reinstall the man pages via the doc Makefile.
+
diff --git a/games/slashem-tty/pkg-plist b/games/slashem-tty/pkg-plist
index d01452631b0d..d7ae36104ef1 100644
--- a/games/slashem-tty/pkg-plist
+++ b/games/slashem-tty/pkg-plist
@@ -1,19 +1,35 @@
+@mode 555
bin/slashem
-%%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt
-%%PORTDOCS%%%%DOCSDIR%%/sample.slashemrc
-%%PORTDOCS%%%%DOCSDIR%%/slamfaq.txt
+@mode
+@owner games
+@group games
%%DATADIR%%/license
+@mode 664
%%DATADIR%%/logfile
+@mode
%%DATADIR%%/nhshare
%%DATADIR%%/nhushare
%%DATADIR%%/perm
+@mode 664
%%DATADIR%%/record
+@mode 02755
%%DATADIR%%/recover
%%DATADIR%%/slashem
+@mode
+@mode
+@owner
+@group
+man/man6/dgn_comp.6.gz
+man/man6/dlb.6.gz
+man/man6/lev_comp.6.gz
+man/man6/recover.6.gz
+man/man6/slashem.6.gz
+%%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt
+%%PORTDOCS%%%%DOCSDIR%%/sample.slashemrc
+%%PORTDOCS%%%%DOCSDIR%%/slamfaq.txt
@exec mkdir %D/%%DATADIR%%/save
-@exec chmod -R 775 %D/%%DATADIR%%
-@exec chmod 2755 %D/%%DATADIR%%/save
@exec chown games:games %D/%%DATADIR%%/save
-@dirrmtry %%DATADIR%%/save
+@exec chmod 0775 %D/%%DATADIR%%/save
+@unexec rmdir %D/%%DATADIR%%/save
@dirrmtry %%DATADIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%