aboutsummaryrefslogtreecommitdiff
path: root/games/crafty/Makefile
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2014-03-17 07:47:13 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2014-03-17 07:47:13 +0000
commitcd649878dfaec072fa9de6fb5d034420eadf64d1 (patch)
treec6f04e704a62ed2015ab032c9fe4a01c39610fcd /games/crafty/Makefile
parent10b4bd4d4d07bc243a72de94169c5436aacb16c0 (diff)
downloadports-cd649878dfaec072fa9de6fb5d034420eadf64d1.tar.gz
ports-cd649878dfaec072fa9de6fb5d034420eadf64d1.zip
Notes
Diffstat (limited to 'games/crafty/Makefile')
-rw-r--r--games/crafty/Makefile56
1 files changed, 26 insertions, 30 deletions
diff --git a/games/crafty/Makefile b/games/crafty/Makefile
index 1b5a3a25431d..b0dd60be46fd 100644
--- a/games/crafty/Makefile
+++ b/games/crafty/Makefile
@@ -23,13 +23,6 @@ USES= gmake zip
BOOKS= books.bin
DISTFILES+= ${BOOKS:S/$/:books/}
-.if !defined(NOPORTDOCS)
-DOCFILES= crafty.doc.ascii crafty.doc.ps
-DISTFILES+= ${DOCFILES:S/$/:doc/}
-UTILS= bitmaps.tgz sound.zip
-DISTFILES+= ${UTILS:S/$/:utils/}
-.endif
-
ALL_TARGET= freebsd
WITH_BOOKDIR?= ${PREFIX}/lib/crafty
@@ -44,8 +37,16 @@ OPT= -DCPUS=4 -DHASHSTATS -DTRACE -DBOOKDIR=\\\"${WITH_BOOKDIR}\\\" \
-DTBDIR=\\\"${WITH_TBDIR}\\\" \
-DPERSDIR=\\\"${WITH_PERSDIR}\\\" -DSKILL
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+DOCFILES= crafty.doc.ascii crafty.doc.ps
+DISTFILES+= ${DOCFILES:S/$/:doc/}
+UTILS= bitmaps.tgz sound.zip
+DISTFILES+= ${UTILS:S/$/:utils/}
+.endif
.if ${ARCH} == "i386"
OPT+= -DINLINE32
@@ -76,26 +77,21 @@ post-build:
(cd ${WRKSRC}; ./crafty bookpath=. <${FILESDIR}/books-building)
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/crafty ${PREFIX}/bin/crafty
- ${CHOWN} root:nogroup ${PREFIX}/bin/crafty
- ${CHMOD} 2555 ${PREFIX}/bin/crafty
- ${MKDIR} ${PREFIX}/lib/crafty/cpf
- ${CHOWN} -R root:nogroup ${PREFIX}/lib/crafty
- ${CHMOD} 775 ${PREFIX}/lib/crafty ${PREFIX}/lib/crafty/cpf
+ ${INSTALL_PROGRAM} ${WRKSRC}/crafty ${STAGEDIR}${PREFIX}/bin/crafty
+ ${CHOWN} root:nogroup ${STAGEDIR}${PREFIX}/bin/crafty
+ ${CHMOD} 2555 ${STAGEDIR}${PREFIX}/bin/crafty
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/crafty/cpf
+ ${CHOWN} -R root:nogroup ${STAGEDIR}${PREFIX}/lib/crafty
+ ${CHMOD} 775 ${STAGEDIR}${PREFIX}/lib/crafty ${STAGEDIR}${PREFIX}/lib/crafty/cpf
.if defined(WITH_BOOK)
- ${INSTALL_DATA} ${WRKSRC}/book.bin ${PREFIX}/lib/crafty/book.bin
-.endif
- ${INSTALL_DATA} ${WRKSRC}/books.bin ${PREFIX}/lib/crafty/books.bin
- ${INSTALL_DATA} ${WRKSRC}/crafty.hlp ${PREFIX}/lib/crafty/crafty.hlp
- ${CHOWN} root:nogroup ${PREFIX}/lib/crafty/book*
- ${CHMOD} 664 ${PREFIX}/lib/crafty/book*
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
- cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${UTILS} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/book.bin ${STAGEDIR}${PREFIX}/lib/crafty/book.bin
.endif
-
-post-install:
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.post.mk>
+ ${INSTALL_DATA} ${WRKSRC}/books.bin ${STAGEDIR}${PREFIX}/lib/crafty/books.bin
+ ${INSTALL_DATA} ${WRKSRC}/crafty.hlp ${STAGEDIR}${PREFIX}/lib/crafty/crafty.hlp
+ ${CHOWN} root:nogroup ${STAGEDIR}${PREFIX}/lib/crafty/book*
+ ${CHMOD} 664 ${STAGEDIR}${PREFIX}/lib/crafty/book*
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${DOCFILES} ${STAGEDIR}${DOCSDIR}
+ cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${UTILS} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>