2001-07-22 00:28:09 +02:00
|
|
|
# New ports collection makefile for: Q3 Mod: Rocket Arena 3
|
|
|
|
# Date created: Sun Jun 3 00:53:00 EDT 2001
|
|
|
|
# Whom: pat@databits.net
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME?= ra3
|
|
|
|
PORTVERSION?= 1.5
|
|
|
|
CATEGORIES= games linux
|
|
|
|
MASTER_SITES?= http://www.quakeshit.com/files/ \
|
|
|
|
ftp://ftp.gigabell.net/pub/exp/q3/mod/ra3/ \
|
|
|
|
ftp://ftp.telekabel.at/pub/games/quake3/ra3/ \
|
|
|
|
ftp://ftp.online.no/pub/online.no/spill/servers/quake/quake3/ra3/
|
|
|
|
PKGNAMEPREFIX= q3server-
|
|
|
|
.ifndef(DISTNAME)
|
|
|
|
DISTFILES?= ${PORTNAME}${PORTVERSION:S/.//}cl_linuxmac.zip \
|
|
|
|
${PORTNAME}${PORTVERSION:S/.//}sv.zip
|
|
|
|
.endif
|
|
|
|
|
2001-11-15 23:12:13 +01:00
|
|
|
MAINTAINER?= pat@FreeBSD.org
|
2003-03-07 03:35:59 +01:00
|
|
|
COMMENT?= Quake III Arena Mod: Rocket Arena 3 for Linux
|
2001-07-22 00:28:09 +02:00
|
|
|
|
|
|
|
RUN_DEPENDS= ${LINUXBASE}/usr/games/quake3/q3ded:${Q3SERVER_PORT}
|
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
USE_LINUX_PREFIX= yes
|
2002-06-16 20:50:44 +02:00
|
|
|
USE_PERL5= yes
|
2001-07-22 00:28:09 +02:00
|
|
|
NO_CDROM= "Size; the data set is much too big"
|
|
|
|
NO_BUILD= yes
|
|
|
|
.if (${PORTNAME}==ra3)
|
|
|
|
WRKSRC= ${WRKDIR}/arena
|
|
|
|
HAS_WIERDPATCHES= yes
|
|
|
|
.endif
|
|
|
|
.ifndef(DONT_USE_ZIP)
|
|
|
|
USE_ZIP= yes
|
|
|
|
.endif
|
|
|
|
.if defined(HAS_WIERDPATCHES)
|
|
|
|
EXTRACT_ONLY?= ${PORTNAME}${PORTVERSION:S/.//}cl_linuxmac.zip
|
|
|
|
.endif
|
|
|
|
.ifndef(NO_WRKSUBDIR)
|
|
|
|
Q3SUBDIR?= ${WRKSRC:T}
|
|
|
|
WRKSRC?= ${WRKDIR}/${PORTNAME}
|
|
|
|
.else
|
|
|
|
Q3SUBDIR?= ${PORTNAME}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
Q3DIR= usr/games/quake3/${Q3SUBDIR}/
|
|
|
|
|
|
|
|
PLIST_SUB+= Q3DIR="${Q3DIR}"
|
2001-10-27 03:35:46 +02:00
|
|
|
INSTALL_DIR= ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755
|
2001-07-22 00:28:09 +02:00
|
|
|
SORT?= /usr/bin/sort
|
|
|
|
|
|
|
|
Q3SERVER_PORT= ${.CURDIR}/../q3server
|
|
|
|
PKGMESSAGE!= cd ${Q3SERVER_PORT} && ${MAKE} -V PKGMESSAGE
|
|
|
|
|
2001-10-15 22:13:57 +02:00
|
|
|
.if defined(HAS_WIERDPATCHES) && defined(DISTFILES)
|
2001-07-22 00:28:09 +02:00
|
|
|
post-extract:
|
2001-10-15 22:13:57 +02:00
|
|
|
.for files in ${DISTFILES:S/${EXTRACT_ONLY}//}
|
2001-07-22 00:28:09 +02:00
|
|
|
@cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
|
2001-10-15 22:13:57 +02:00
|
|
|
${DISTDIR}/${DIST_SUBDIR}/${files}
|
|
|
|
.endfor
|
2001-07-22 00:28:09 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-patch:
|
|
|
|
# remove trailing ^M
|
|
|
|
@find -E ${WRKSRC} -type f \
|
|
|
|
-iregex ".*\.(bat|cfg|gam|htm|html|inf|ini|lst|sc|scr|txt|url)" \
|
|
|
|
-exec ${PERL} -pi -ne 's!\r\n!\n!' {} 1>/dev/null 2>&1 \;
|
|
|
|
|
|
|
|
# Parses PLIST
|
|
|
|
# Contributed by <lioux@FreeBSD.org>
|
|
|
|
do-install: install-parse-plist install-scripts
|
|
|
|
|
|
|
|
install-parse-plist: generate-plist
|
|
|
|
@${PERL} -e 'open(FHANDLER,"${TMPPLIST}");' \
|
|
|
|
-e 'open(FDIR,">${WRKDIR}/dirs.sh.tmp");' \
|
|
|
|
-e 'open(FFILES,">${WRKDIR}/files.sh");' \
|
|
|
|
-e 'while (!eof(FHANDLER)) {' \
|
|
|
|
-e 'chop($$file = <FHANDLER>);' \
|
|
|
|
-e '$$dir = $$file_partial = $$file;' \
|
|
|
|
-e '$$file_partial =~ s!^${Q3DIR}!!;' \
|
|
|
|
-e 'print FDIR "${INSTALL_DIR}", \
|
|
|
|
" ", "\"${PREFIX}/$$dir\"", \
|
|
|
|
"\n" if $$dir =~ s!(^\@dirrm\s+)!!;' \
|
|
|
|
-e 'print FFILES "${INSTALL_DATA}", \
|
|
|
|
" ", "\"${WRKSRC}/$$file_partial\"", \
|
|
|
|
" ", "\"${PREFIX}/$$file\"", \
|
|
|
|
"\n" if ($$file !~ m!^\@!);' \
|
|
|
|
-e '}' \
|
|
|
|
-e 'close(FFILES);' \
|
|
|
|
-e 'close(FDIR);' \
|
|
|
|
-e 'close(FHANDLER);'
|
|
|
|
|
|
|
|
install-scripts:
|
|
|
|
@${INSTALL_DIR} ${PREFIX}/${Q3DIR}
|
|
|
|
@${SORT} ${WRKDIR}/dirs.sh.tmp > ${WRKDIR}/dirs.sh
|
|
|
|
@${SH} ${WRKDIR}/dirs.sh
|
|
|
|
@${SH} ${WRKDIR}/files.sh
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|