1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

. Support staging.

This commit is contained in:
Greg Lewis 2014-06-10 03:22:23 +00:00
parent 9939e77584
commit 382844150f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357248
5 changed files with 45 additions and 61 deletions

View File

@ -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

View File

@ -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}

View File

@ -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")

View File

@ -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

View File

@ -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%%