2000-07-15 16:04:39 +02:00
|
|
|
# New ports collection makefile for: Half-Life Dedicated Server
|
|
|
|
# Date created: Sat Jul 15 14:27:16 SAST 2000
|
|
|
|
# Whom: markm@FreeBSD.org
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2001-04-08 16:05:37 +02:00
|
|
|
PORTNAME= hlds
|
2001-09-28 18:54:17 +02:00
|
|
|
PORTVERSION= 3.1.0.8.0a
|
2000-07-15 16:04:39 +02:00
|
|
|
CATEGORIES= games linux
|
2001-09-21 05:51:17 +02:00
|
|
|
MASTER_SITES= ftp://files.ausgamers.com/half-life/linux/ \
|
2001-09-28 18:54:17 +02:00
|
|
|
http://fileplanet.games-world.net/dl/ftp1.gamespy.com/action/half-life/official/ \
|
|
|
|
ftp://ftp.houstonlive.net/CounterStrike/ \
|
|
|
|
ftp://mirrors.cstrike.org/pub/mirrors/cstrike/ \
|
|
|
|
http://www.redphive.org/files/
|
|
|
|
DISTFILES= hlds_l_3108_full.tar.gz \
|
|
|
|
hlds_l_3108a_up.tar.gz
|
2000-07-15 16:04:39 +02:00
|
|
|
|
2001-03-23 11:16:47 +01:00
|
|
|
MAINTAINER= pat@databits.net
|
2000-10-26 20:56:09 +02:00
|
|
|
|
2001-04-17 21:49:08 +02:00
|
|
|
ONLY_FOR_ARCHS= i386
|
2001-04-08 16:05:37 +02:00
|
|
|
USE_LINUX_PREFIX= yes
|
2000-07-15 16:04:39 +02:00
|
|
|
NO_CDROM= "Size; the data set is much too big"
|
|
|
|
NO_BUILD= yes
|
|
|
|
WRKSRC= ${WRKDIR}/hlds_l
|
2001-04-18 05:04:36 +02:00
|
|
|
PLIST_SUB= ${PLIST_SUB_FOR_THIS_PORT}
|
|
|
|
PLIST_SUB_FOR_THIS_PORT= HLDSDIR="${HLDSDIR:S/^\///}" LDCONFIG="${LDCONFIG_LINUX}"
|
2000-07-15 16:04:39 +02:00
|
|
|
|
2001-04-08 16:05:37 +02:00
|
|
|
INSTALL_DIR= ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
|
|
|
|
LDCONFIG_LINUX= ${LINUXBASE}/sbin/ldconfig
|
2000-07-15 16:04:39 +02:00
|
|
|
|
2001-04-08 16:05:37 +02:00
|
|
|
HLDSDIR= /usr/games/hlds_l/
|
|
|
|
HL_PROGRAM= hlds_run
|
2001-07-14 17:20:39 +02:00
|
|
|
SORT?= /usr/bin/sort
|
2000-07-15 16:04:39 +02:00
|
|
|
|
2001-04-08 16:05:37 +02:00
|
|
|
pre-patch:
|
|
|
|
# remove trailing ^M
|
2001-07-14 17:20:39 +02:00
|
|
|
@find -E ${WRKSRC} -type f \
|
2001-09-21 05:51:17 +02:00
|
|
|
-iregex ".*\.(bat|cfg|gam|htm|html|inf|ini|lst|sc|scr|txt|rc)" \
|
2001-07-14 17:20:39 +02:00
|
|
|
-exec ${PERL} -pi -ne 's!\r\n!\n!' {} 1>/dev/null 2>&1 \;
|
2001-04-08 16:05:37 +02:00
|
|
|
|
2001-07-14 17:20:39 +02:00
|
|
|
do-install: install-parse-plist install-run-scripts scan-libs
|
2001-04-08 16:05:37 +02:00
|
|
|
|
2001-07-14 17:20:39 +02:00
|
|
|
# Contributed by <lioux@FreeBSD.org>
|
|
|
|
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!^${HLDSDIR:S!^/!!}!!;' \
|
|
|
|
-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);'
|
|
|
|
@${SORT} ${WRKDIR}/dirs.sh.tmp > ${WRKDIR}/dirs.sh
|
|
|
|
|
|
|
|
install-run-scripts:
|
|
|
|
.for script in dirs files
|
|
|
|
@${SH} ${WRKDIR}/${script}.sh
|
2001-04-08 16:05:37 +02:00
|
|
|
.endfor
|
2001-03-23 11:16:47 +01:00
|
|
|
|
2001-04-08 16:05:37 +02:00
|
|
|
scan-libs:
|
|
|
|
@${LDCONFIG_LINUX}
|
2001-03-23 11:16:47 +01:00
|
|
|
|
2001-06-22 21:11:50 +02:00
|
|
|
post-install:
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
2001-03-23 11:16:47 +01:00
|
|
|
.include <bsd.port.mk>
|