diff options
Diffstat (limited to 'games/halflifeserver/Makefile')
-rw-r--r-- | games/halflifeserver/Makefile | 73 |
1 files changed, 46 insertions, 27 deletions
diff --git a/games/halflifeserver/Makefile b/games/halflifeserver/Makefile index 30b35c00b061..78e67efc9203 100644 --- a/games/halflifeserver/Makefile +++ b/games/halflifeserver/Makefile @@ -5,53 +5,72 @@ # $FreeBSD$ # -PORTNAME= HLDS +PORTNAME= hlds PORTVERSION= 3.1.0.6 CATEGORIES= games linux -MASTER_SITES= http://hex.databits.net/~pat/ \ - http://ftp1download.gamespy.com/fileplanet/fpnew/action/half-life/official/ \ +MASTER_SITES= http://ftp1download.gamespy.com/fileplanet/fpnew/action/half-life/official/ \ http://www.jetstreamgames.co.nz/files/pub/gamespyftp1/fpnew/action/half-life/official/ \ ftp://ftp.fasta.fh-dortmund.de/gdi/halflife/server/linux/ \ ftp://fileplanet.ngi.it/fileplanet/fpnew/action/half-life/official/ \ ftp://ftp.gmd.de/people/cla/hl/hl-newest/linux/ \ ftp://ftp.icsmedia.de/pub/games/halflife/hl_server/ DISTNAME= hlds_l3106 -EXTRACT_ONLY= MAINTAINER= pat@databits.net -BUILD_DEPENDS= /compat/linux/lib/ld.so:${PORTSDIR}/emulators/linux_base -RUN_DEPENDS= /compat/linux/usr/i486-linux-libc5/lib/libc.so.5:${PORTSDIR}/emulators/linux_base - +USE_LINUX_PREFIX= yes NO_CDROM= "Size; the data set is much too big" NO_BUILD= yes -PREFIX= /compat/linux WRKSRC= ${WRKDIR}/hlds_l -EXTRACT_ONLY_1= hlds_l3106.tar.gz +PLIST_SUB= HLDSDIR="${HLDSDIR:S/^\///}" LDCONFIG="${LDCONFIG_LINUX}" -HLDSDIR= /usr/games/hlds_l +INSTALL_DIR= ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} +LDCONFIG_LINUX= ${LINUXBASE}/sbin/ldconfig +STRIP_LINUX= ${LINUXBASE}/usr/bin/strip -do-install: - @cd ${PREFIX}/usr/games ;\ - for file in ${EXTRACT_ONLY_1}; do \ - if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$${file} ${EXTRACT_AFTER_ARGS}) ;\ - then \ - exit 1 ;\ - fi \ - done - @cd ${PREFIX}${HLDSDIR} ;\ - for file in ${EXTRACT_ONLY_2}; do \ - if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$${file} ${EXTRACT_AFTER_ARGS}) ;\ - then \ - exit 1 ;\ - fi \ - done +HLDSDIR= /usr/games/hlds_l/ +HL_DIRS= valve/maps valve/events valve/dlls valve/cl_dlls \ + tfc/tfstats tfc/sound/weapons tfc/sound/vox \ + tfc/sound/misc tfc/models/player/spy \ + tfc/models/player/soldier tfc/models/player/sniper \ + tfc/models/player/scout tfc/models/player/pyro \ + tfc/models/player/medic tfc/models/player/hvyweapon \ + tfc/models/player/engineer tfc/models/player/demo \ + tfc/models/player/civilian tfc/maps tfc/manual \ + tfc/events/wpn tfc/events/misc tfc/events/explode \ + tfc/events/door tfc/dlls tfc/cl_dlls +HL_PROGRAM= hlds_run - if ! (cat ${PREFIX}/etc/ld.so.conf | ${GREP} ${HLDSDIR}) ;\ +pre-patch: +# remove trailing ^M +.for file in */*.cfg */*.lst *.txt */*.txt */*.htm */*.gam + @${PERL} -pi -ne 's!\r\n!\n!' ${WRKSRC}/${file} +.endfor + +do-install: install-files scan-libs + +install-files: +# directories +.for directory in ${HL_DIRS} + @${INSTALL_DIR} ${PREFIX}${HLDSDIR}${directory} +.endfor +# if you change the PLIST, please re-think the following +# files + @for file in `${SED} -E -e "s!^\@.+!!" -e "s!%%HLDSDIR%%!!" ${PLIST}` ;\ + do \ + ${INSTALL_DATA} ${WRKSRC}/$${file} ${PREFIX}${HLDSDIR}$${file} ;\ + done +# trim/set permissions + @${CHMOD} ${BINMODE} ${PREFIX}${HLDSDIR}${HL_PROGRAM} + @${STRIP_LINUX} ${PREFIX}${HLDSDIR}${HL_PROGRAM} +# libraries +# this should go in a pkg-install, should be checked later + @if ! (${GREP} -E \"^${HLDSDIR}$$\" ${PREFIX}/etc/ld.so.conf >/dev/null 2>/dev/null) ;\ then \ ${ECHO} ${HLDSDIR} >> ${PREFIX}/etc/ld.so.conf ;\ fi - ${PREFIX}${SH} -c ${LDCONFIG} +scan-libs: + @${LDCONFIG_LINUX} .include <bsd.port.mk> |