aboutsummaryrefslogtreecommitdiffstats
path: root/games/moria
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2014-06-10 11:22:23 +0800
committerglewis <glewis@FreeBSD.org>2014-06-10 11:22:23 +0800
commit1f32a9d6725f17789e069f0a588e73864c89e66c (patch)
tree4cff44cfc518f1ff504679c79313e1a2d09aa3a6 /games/moria
parent6e1913bef8526b3ff192d71e4149f642ca0678a2 (diff)
downloadfreebsd-ports-gnome-1f32a9d6725f17789e069f0a588e73864c89e66c.tar.gz
freebsd-ports-gnome-1f32a9d6725f17789e069f0a588e73864c89e66c.tar.zst
freebsd-ports-gnome-1f32a9d6725f17789e069f0a588e73864c89e66c.zip
. Support staging.
Diffstat (limited to 'games/moria')
-rw-r--r--games/moria/Makefile24
-rw-r--r--games/moria/files/patch-doc::Makefile4
-rw-r--r--games/moria/files/patch-source::config.h2
-rw-r--r--games/moria/files/patch-unix::Makefile34
-rw-r--r--games/moria/pkg-plist42
5 files changed, 45 insertions, 61 deletions
diff --git a/games/moria/Makefile b/games/moria/Makefile
index be23a96ae7e2..87ccd1cf2d3e 100644
--- a/games/moria/Makefile
+++ b/games/moria/Makefile
@@ -12,26 +12,22 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= glewis@FreeBSD.org
COMMENT= A dungeon exploration game
-
-MAN6= moria.6
WRKSRC= ${WRKDIR}/umoria
ALL_TARGET= moria
-MAKE_ENV+= DOCSDIR="${DOCSDIR}" MKDIR="${MKDIR}" CHOWN="${CHOWN}" \
- CHGRP="${CHGRP}" CHMOD="${CHMOD}" TOUCH="${TOUCH}"
+MAKE_ENV+= DOCSDIR="${DOCSDIR}" MKDIR="${MKDIR}" TOUCH="${TOUCH}" \
+ STAGEDIR="${STAGEDIR}" DATADIR="${DATADIR}"
+
+.if !defined(NOPORTDOCS)
+PORTDOCS= *
+.endif
-NO_STAGE= yes
do-configure:
- for i in ${WRKSRC}/source/config.h ${WRKSRC}/unix/Makefile; do \
- ${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:g" $$i; \
- done
+ ${REINPLACE_CMD} -e "s:%%DATADIR%%:${DATADIR}:g" ${WRKSRC}/source/config.h
cd ${WRKSRC} && ${LN} -sf source/* unix/* .
-post-install:
-.if !defined(NO_INSTALL_MANPAGES)
- for i in ${MAN6}; do \
- ${INSTALL_MAN} ${WRKSRC}/doc/$$i ${PREFIX}/man/man6; \
- done
-.endif
+do-install:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install
+ ${INSTALL_MAN} ${WRKSRC}/doc/moria.6 ${STAGEDIR}${PREFIX}/man/man6/
.if !defined(NOPORTDOCS)
cd ${WRKSRC}/doc && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install
.endif
diff --git a/games/moria/files/patch-doc::Makefile b/games/moria/files/patch-doc::Makefile
index c0cba5b24b4e..91ed516b5c23 100644
--- a/games/moria/files/patch-doc::Makefile
+++ b/games/moria/files/patch-doc::Makefile
@@ -13,5 +13,5 @@ $FreeBSD$
+ cat moria1.txt moria2.txt > moria.txt
+
+install: moria.ms moria.txt
-+ ${MKDIR} ${DOCSDIR}
-+ ${BSD_INSTALL_DATA} ${FILES} ${DOCSDIR}
++ ${MKDIR} ${STAGEDIR}${DOCSDIR}
++ ${BSD_INSTALL_DATA} ${FILES} ${STAGEDIR}${DOCSDIR}
diff --git a/games/moria/files/patch-source::config.h b/games/moria/files/patch-source::config.h
index b6c29d2c165c..5bfd9da5d0a0 100644
--- a/games/moria/files/patch-source::config.h
+++ b/games/moria/files/patch-source::config.h
@@ -25,7 +25,7 @@ $FreeBSD$
-#define MORIA_OWIZ_HELP MORIA_LIB(owizcmds.hlp)
-#define MORIA_WELCOME MORIA_LIB(welcome.hlp)
-#define MORIA_VER MORIA_LIB(version.hlp)
-+#define MORIA_LIB(xxx) "%%PREFIX%%/share/moria/" xxx
++#define MORIA_LIB(xxx) "%%DATADIR%%/" xxx
+#define MORIA_HOU MORIA_LIB("hours")
+#define MORIA_MOR MORIA_LIB("news")
+#define MORIA_TOP MORIA_LIB("scores")
diff --git a/games/moria/files/patch-unix::Makefile b/games/moria/files/patch-unix::Makefile
index 281059488f5a..b78b568e23ec 100644
--- a/games/moria/files/patch-unix::Makefile
+++ b/games/moria/files/patch-unix::Makefile
@@ -1,19 +1,17 @@
-$FreeBSD$
-
---- unix/Makefile.orig Thu Jul 21 16:37:08 1994
-+++ unix/Makefile Tue Aug 12 10:12:16 2003
-@@ -3,15 +3,15 @@
+--- unix/Makefile.orig 1994-07-21 15:37:08.000000000 -0700
++++ unix/Makefile 2014-06-09 19:44:28.000000000 -0700
+@@ -1,17 +1,13 @@
+ # BINDIR is the directory where the moria binary while be put
+ # LIBDIR is where the other files (score, news, hours) will be put
# LIBDIR must be the same directory defined in config.h
- # OWNER is who you want the game to be chown to.
- # GROUP is who you wnat the game to be chgrp to.
+-# OWNER is who you want the game to be chown to.
+-# GROUP is who you wnat the game to be chgrp to.
-BINDIR = /home/zariski/grabiner/moria
-LIBDIR = /home/zariski/grabiner/moria/files
-OWNER = grabiner
-GROUP = grad
-+BINDIR = %%PREFIX%%/bin
-+LIBDIR = %%PREFIX%%/share/moria/
-+OWNER = games
-+GROUP = games
++BINDIR = ${STAGEDIR}${PREFIX}/bin
++LIBDIR = ${STAGEDIR}${DATADIR}
# For testing and debugging the program, it is best to use this line.
# CFLAGS = -g
@@ -23,7 +21,7 @@ $FreeBSD$
# For BSD Systems
CURSES = -lcurses -ltermcap
-@@ -26,7 +26,7 @@
+@@ -26,7 +22,7 @@
# Normal systems don't require anything here.
LFLAGS =
@@ -32,7 +30,7 @@ $FreeBSD$
SRCS = main.c misc1.c misc2.c misc3.c misc4.c store1.c files.c io.c \
create.c desc.c generate.c sets.c dungeon.c creature.c death.c \
-@@ -60,17 +60,19 @@
+@@ -60,17 +56,11 @@
# you must define BINDIR and LIBDIR before installing
# assumes that BINDIR and LIBDIR exist
install:
@@ -48,18 +46,10 @@ $FreeBSD$
- (cd $(LIBDIR); chown $(OWNER) $(LIBFILES) scores)
- (cd $(LIBDIR); chgrp $(GROUP) $(LIBFILES) scores)
+ -${MKDIR} $(BINDIR)
-+ ${CHMOD} 755 $(BINDIR)
+ ${BSD_INSTALL_PROGRAM} moria $(BINDIR)
-+ ${CHMOD} 4711 $(BINDIR)/moria
+ -${MKDIR} $(LIBDIR)
-+ ${CHMOD} 711 $(LIBDIR)
+ (cd files; ${BSD_INSTALL_DATA} $(LIBFILES) $(LIBDIR))
-+ (cd $(LIBDIR); ${CHMOD} 444 $(LIBFILES))
-+ (cd $(LIBDIR); ${TOUCH} scores; ${CHMOD} 644 scores)
-+ ${CHOWN} $(OWNER) $(BINDIR)/moria
-+ ${CHGRP} $(GROUP) $(BINDIR)/moria
-+ (cd $(LIBDIR); ${CHOWN} $(OWNER) $(LIBFILES) scores)
-+ (cd $(LIBDIR); ${CHGRP} $(GROUP) $(LIBFILES) scores)
++ (cd $(LIBDIR); ${TOUCH} scores)
# If you are short on disk space, or aren't interested in debugging moria.
# strip $(BINDIR)/moria
diff --git a/games/moria/pkg-plist b/games/moria/pkg-plist
index 70978619d962..3f9c090d030c 100644
--- a/games/moria/pkg-plist
+++ b/games/moria/pkg-plist
@@ -1,23 +1,21 @@
+@owner games
+@group games
+@mode 4711
bin/moria
-%%PORTDOCS%%%%DOCSDIR%%/ERRORS
-%%PORTDOCS%%%%DOCSDIR%%/FEATURES.NEW
-%%PORTDOCS%%%%DOCSDIR%%/dragon.inf
-%%PORTDOCS%%%%DOCSDIR%%/exp.doc
-%%PORTDOCS%%%%DOCSDIR%%/faq
-%%PORTDOCS%%%%DOCSDIR%%/history
-%%PORTDOCS%%%%DOCSDIR%%/moria.ms
-%%PORTDOCS%%%%DOCSDIR%%/moria.txt
-%%PORTDOCS%%%%DOCSDIR%%/pronounc
-%%PORTDOCS%%%%DOCSDIR%%/spells.doc
-%%PORTDOCS%%%%DOCSDIR%%/where.inf
-share/moria/hours
-share/moria/news
-share/moria/origcmds.hlp
-share/moria/owizcmds.hlp
-share/moria/roglcmds.hlp
-share/moria/rwizcmds.hlp
-share/moria/scores
-share/moria/version.hlp
-share/moria/welcome.hlp
-%%PORTDOCS%%@dirrm share/doc/moria
-@dirrm share/moria
+@mode 444
+%%DATADIR%%/hours
+%%DATADIR%%/news
+%%DATADIR%%/origcmds.hlp
+%%DATADIR%%/owizcmds.hlp
+%%DATADIR%%/roglcmds.hlp
+%%DATADIR%%/rwizcmds.hlp
+@mode 644
+%%DATADIR%%/scores
+@mode 444
+%%DATADIR%%/version.hlp
+%%DATADIR%%/welcome.hlp
+@owner
+@group
+@mode
+man/man6/moria.6.gz
+@dirrm %%DATADIR%%