diff options
Diffstat (limited to 'games/nethack32/Makefile')
-rw-r--r-- | games/nethack32/Makefile | 55 |
1 files changed, 48 insertions, 7 deletions
diff --git a/games/nethack32/Makefile b/games/nethack32/Makefile index a148c2d4f2a5..c3e89e5b5596 100644 --- a/games/nethack32/Makefile +++ b/games/nethack32/Makefile @@ -7,10 +7,10 @@ PORTNAME= nethack PORTVERSION= 3.2.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITE_SUBDIR= ${PORTNAME} DISTNAME= nethack-322 EXTRACT_SUFX= .tgz @@ -21,22 +21,63 @@ PATCHFILES= nh-3.2.2-3.2.3.diff MAINTAINER= glewis@FreeBSD.org COMMENT= A dungeon explorin', slashin', hackin' game -NO_LATEST_LINK= yes - WRKSRC= ${WRKDIR}/${PORTNAME}-3.2.2 +LATEST_LINK= nethack32 -USE_XPM= yes USE_GMAKE= yes -MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6 +USE_REINPLACE= yes +USE_XPM= yes +PLIST_SUB= HACKNAME="${HACKNAME}" \ + HACKEXT="${HACKEXT}" + +MAN6= dgn_comp${HACKEXT}.6 dlb${HACKEXT}.6 lev_comp${HACKEXT}.6 \ + ${HACKNAME}.6 recover${HACKEXT}.6 + +HACKEXT?= 32 +HACKNAME?= ${PORTNAME}${HACKEXT} +HACKDIR?= share/${HACKNAME} +HACKLINK= nethack + +DATADIR= ${PREFIX}/${HACKDIR} +DOCSDIR= ${PREFIX}/share/doc/${HACKNAME} +PKGDEINSTALL= ${WRKDIR}/pkg-deinstall +PLIST_SUB+= HACKNAME="${HACKNAME}" + +.include <bsd.port.pre.mk> + +.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK} +PLIST_SUB+= HACKLINK="" +.else +PLIST_SUB+= HACKLINK="@comment " +.endif pre-configure: +.for f in include/config.h sys/unix/Makefile.top sys/unix/Makefile.doc + @${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \ + -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \ + -e 's|%%HACKEXT%%|${HACKEXT}|g' \ + ${WRKSRC}/${f} +.endfor +.for f in dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6 + @${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \ + -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \ + -e 's|%%HACKEXT%%|${HACKEXT}|g' \ + ${WRKSRC}/doc/${f} +.endfor @cd ${WRKSRC}/sys/unix && ${SH} setup.sh +pre-install: + @${CAT} ${FILESDIR}/pkg-deinstall.in | ${SED} \ + -e 's|%%HACKDIR%%|${HACKDIR}|g' > ${PKGDEINSTALL} + post-install: +.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK} + @${LN} -s -f ${PREFIX}/bin/${HACKNAME} ${PREFIX}/bin/${HACKLINK} +.endif @cd ${WRKSRC}/doc && ${SETENV} ${MAKE_ENV} ${MAKE} manpages .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${DOCSDIR} .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> |