1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00
freebsd-ports/games/quake2-data/Makefile

90 lines
2.3 KiB
Makefile
Raw Normal View History

# Created by: Alejandro Pulver <alejandro@varnet.biz>
# $FreeBSD$
PORTNAME= data
PORTVERSION= 3.20
PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= IDSOFTWARE/quake2/:data IDSOFTWARE/quake2/source/:src
PKGNAMEPREFIX= ${Q2PKGNAMEPREFIX}
DISTFILES= ${Q2_UPDATE}:data ${Q2_SRC}:src
MAINTAINER= danfe@FreeBSD.org
COMMENT= Quake II data files
# XXX we need info-unzip for q2-314-demo-x86.exe
2014-03-10 14:49:26 +00:00
USES= zip:infozip
NO_WRKSUBDIR= yes
LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}
DATADIR= ${Q2DIR}
DOCSDIR= ${PREFIX}/share/doc/${LATEST_LINK}
Q2_DEMO= q2-314-demo-x86.exe
Q2_SRC= q2src${PORTVERSION:S|.||}.shar.Z
Q2_UPDATE= q2-${PORTVERSION}-x86-full.exe
OPTIONS_DEFINE= MANUAL OPTIMIZED_CFLAGS SHAREWARE
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS
MANUAL_DESC= Install the game HTML manual
SHAREWARE_DESC= Install demo version of the game data
.include "Makefile.include" # must be included before bsd.port.options.mk
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMANUAL} || ${PORT_OPTIONS:MSHAREWARE}
DISTFILES+= ${Q2_DEMO}:data
.endif
.if ${PORT_OPTIONS:MMANUAL}
PLIST_SUB+= MANUAL=""
.else
PLIST_SUB+= MANUAL="@comment "
.endif
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
CFLAGS+= -ffast-math -funroll-loops -fomit-frame-pointer \
-fexpensive-optimizations
.endif
.if ${PORT_OPTIONS:MSHAREWARE}
PLIST_SUB+= FULL="@comment " SHAREWARE=""
.else
PLIST_SUB+= FULL="" SHAREWARE="@comment "
SUB_FILES= pkg-message
.endif
do-extract:
@${MKDIR} ${WRKDIR}
@cd ${WRKDIR} && uncompress -c ${DISTDIR}/${Q2_SRC} | \
${TAIL} +434 | ${SH}
@${UNZIP_CMD} -q -d ${WRKDIR} \
${DISTDIR}/${Q2_UPDATE} baseq2/* -x *.dll
.if ${PORT_OPTIONS:MMANUAL}
@${UNZIP_CMD} -ajq -d ${WRKDIR}/DOCS \
${DISTDIR}/${Q2_DEMO} Install/Data/DOCS/*
.endif
.if ${PORT_OPTIONS:MSHAREWARE}
@${RM} ${WRKDIR}/baseq2/pak[^0].pak
@${UNZIP_CMD} -jq -d ${WRKDIR}/baseq2 \
${DISTDIR}/${Q2_DEMO} Install/Data/baseq2/pak0.pak
.endif
post-extract:
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
post-patch:
@${REINPLACE_CMD} -e 's/__linux__/__unix__/' ${WRKSRC}/q_shared.[ch]
do-install:
2014-07-03 22:08:59 +00:00
@${MKDIR} ${STAGEDIR}${DATADIR}/baseq2
${INSTALL_PROGRAM} ${WRKSRC}/game.so ${STAGEDIR}${DATADIR}/baseq2
${CP} -a ${WRKSRC}/baseq2/* ${STAGEDIR}${DATADIR}/baseq2
.if ${PORT_OPTIONS:MMANUAL}
2014-07-03 22:08:59 +00:00
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${CP} -a ${WRKSRC}/DOCS ${STAGEDIR}${DOCSDIR}/manual
.endif
.include <bsd.port.mk>