2000-08-09 17:34:16 +00:00
|
|
|
# New ports collection makefile for: zangband
|
|
|
|
# Date created: 29 May 2000
|
|
|
|
# Whom: Makoto YAMAKURA <makoto@pinpott.spnet.ne.jp>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= zangband
|
2000-10-01 16:12:36 +00:00
|
|
|
PORTVERSION= 2.4.0${JA_VERSION}
|
2000-09-17 18:44:59 +00:00
|
|
|
PORTREVISION= 1
|
2000-08-09 17:34:16 +00:00
|
|
|
CATEGORIES+= games
|
2000-12-22 09:45:09 +00:00
|
|
|
MASTER_SITES= ftp://clockwork.dementia.org/angband/Variant/ZAngband/ \
|
|
|
|
ftp://ftp.sunet.se/pub/games/Angband/Variant/ZAngband/ \
|
2000-10-01 16:12:36 +00:00
|
|
|
${JA_MASTER_SITE}
|
|
|
|
DISTFILES= ${PORTNAME}-${E_VERSION:S/.//g}-src.zip \
|
|
|
|
${JA_DISTFILE}
|
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
|
|
|
EXTRACT_ONLY= ${PORTNAME}-${E_VERSION:S/.//g}-src.zip
|
2000-08-09 17:34:16 +00:00
|
|
|
|
|
|
|
MAINTAINER= makoto@pinpott.spnet.ne.jp
|
|
|
|
|
|
|
|
USE_ZIP= yes
|
|
|
|
EXTRACT_BEFORE_ARGS= -qa
|
|
|
|
USE_XLIB= yes
|
|
|
|
|
|
|
|
NO_CDROM= Possible copyright infringement
|
|
|
|
|
2000-10-08 10:23:48 +00:00
|
|
|
PKGDIR?= ${.CURDIR}
|
2000-08-09 17:34:16 +00:00
|
|
|
WRKSRC= ${WRKDIR}/ZAngband
|
|
|
|
PKGMESSAGE= ${WRKDIR}/MESSAGE
|
|
|
|
PLIST= ${WRKDIR}/PLIST
|
|
|
|
PLIST_SUB+= ANGBANDBIN=${ANGBANDBIN} ANGBANDLIB=${ANGBANDLIB}
|
|
|
|
|
|
|
|
SHAREOWN= games
|
|
|
|
SHAREGRP= games
|
|
|
|
BINOWN= games
|
|
|
|
BINGRP= games
|
|
|
|
BINMODE= 2755
|
|
|
|
|
|
|
|
MAKE_ARGS+= ANGBANDLIB=${PREFIX}/${ANGBANDLIB}
|
2000-10-01 16:12:36 +00:00
|
|
|
ANGBANDLIB?= lib/${PORTNAME}
|
|
|
|
ANGBANDBIN?= bin/${PORTNAME}
|
|
|
|
|
|
|
|
E_VERSION= ${PORTVERSION:S/${JA_VERSION}//}
|
2000-08-09 17:34:16 +00:00
|
|
|
|
|
|
|
.if defined(JAPANESE)
|
2000-10-01 16:12:36 +00:00
|
|
|
PATCH_VERSION?= 000922
|
|
|
|
JA_VERSION= .j${PATCH_VERSION}
|
|
|
|
JA_DISTFILE= zj${E_VERSION:S/.//g}ux-${PATCH_VERSION}.tgz
|
2000-08-09 17:34:16 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(JAPANESE)
|
2000-10-01 16:12:36 +00:00
|
|
|
pre-patch:
|
2000-08-09 17:34:16 +00:00
|
|
|
(cd ${WRKSRC} ; ${TAR} zxf ${DISTDIR}/${DIST_SUBDIR}/zj${E_VERSION:S/.//g}ux-${PATCH_VERSION}.tgz)
|
|
|
|
(cd ${WRKSRC}/src ; ${PATCH} -p1 -l -s < ../zj${E_VERSION:S/.//g}.patch ; ${PATCH} -p1 -l -s < ${FILESDIR}/makefile-adjust.patch)
|
|
|
|
.endif
|
2000-10-01 16:12:36 +00:00
|
|
|
|
|
|
|
pre-build:
|
2000-08-09 17:34:16 +00:00
|
|
|
${CP} ${FILESDIR}/Makefile.in ${WRKSRC}/Makefile
|
|
|
|
${CP} ${WRKSRC}/src/makefile.std ${WRKSRC}/src/Makefile
|
|
|
|
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g;s|%%ANGBANDBIN%%|${ANGBANDBIN}|g;s|%%ANGBANDLIB%%|${ANGBANDLIB}|g" ${FILESDIR}/MESSAGE.in > ${PKGMESSAGE}
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/testing ${PREFIX}/${ANGBANDBIN}
|
|
|
|
${MKDIR} ${PREFIX}/${ANGBANDLIB}
|
|
|
|
${CP} -rp ${WRKSRC}/lib/* ${PREFIX}/${ANGBANDLIB}
|
|
|
|
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${WRKSRC}/lib
|
|
|
|
.if defined(USE_Z_SCORES)
|
|
|
|
test -f ${PREFIX}/${ANGBANDLIB}/apex/scores.raw || \
|
|
|
|
${CP} ${PREFIX}/${ANGBANDLIB}/apex/z_scores.raw \
|
|
|
|
${ANGBANDLIB}/apex/scores.raw
|
|
|
|
.else
|
|
|
|
test -f ${PREFIX}/${ANGBANDLIB}/apex/scores.raw || \
|
|
|
|
${TOUCH} ${PREFIX}/${ANGBANDLIB}/apex/scores.raw
|
|
|
|
.endif
|
|
|
|
(cd ${PREFIX}/${ANGBANDLIB} && \
|
|
|
|
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} apex data ; \
|
|
|
|
${CHMOD} 755 . ; \
|
|
|
|
${CHMOD} -R ug+rw,o-rw * ; \
|
|
|
|
${CHMOD} -R o+r help xtra ; \
|
|
|
|
${CHMOD} 1777 save user \
|
|
|
|
)
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
post-build:
|
|
|
|
@${RM} -f ${PLIST}
|
2000-10-08 02:29:06 +00:00
|
|
|
.for i in pkg-plist.a ${JA_PLIST} pkg-plist.b
|
2000-10-01 16:12:36 +00:00
|
|
|
@${CAT} ${PKGDIR}/${i} >> ${PLIST}
|
2000-08-09 17:34:16 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|