aboutsummaryrefslogtreecommitdiffstats
path: root/games/linux-quake3/Makefile
blob: 4b4d608cc3be4320c63fc91a20d0ff0467a36f6e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:    Quake 3 Arena Dedicated Server
# Date created:             Sun Jun  3 00:52:38 EDT 2001
# Whom:                 pat@databits.net
#
# $FreeBSD$
#

PORTNAME=   q3ded
PORTVERSION=    1.31
CATEGORIES= games linux
MASTER_SITES=   http://fileplanet.games-world.net/dl/ftp1.gamespy.com/fpnew/action/quake3/official/ \
        ftp://ftp.idsoftware.com/idstuff/quake3/linux/ \
        ftp://ftp.bluesnews.com/idstuff/quake3/linux/
DISTNAME=   linuxq3apoint-${PORTVERSION}.x86
EXTRACT_SUFX=   .run

MAINTAINER= pat@FreeBSD.org

ONLY_FOR_ARCHS= i386
USE_LINUX_PREFIX=   yes
USE_PERL5=  yes
NO_CDROM=   "Size; the data set is much too big"
NO_BUILD=   yes
NO_WRKSUBDIR=   yes
Q3DIR=      usr/games/quake3/
PLIST_SUB+= Q3DIR="${Q3DIR}"
INSTALL_DIR=    ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755

do-extract:
    @${RM} -rf ${WRKDIR}
    @${MKDIR} ${WRKDIR}
    @cd ${WRKDIR} && tail +175 ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} | \
        ${TAR} zxvf - >/dev/null

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 \;

do-install:
    @${INSTALL_DIR} ${PREFIX}/${Q3DIR}
    @${INSTALL_DIR} ${PREFIX}/${Q3DIR}baseq3
    @${INSTALL_DIR} ${PREFIX}/${Q3DIR}missionpack
.for basepak in 1 2 3 4 5 6 7
    @${INSTALL_DATA} ${WRKSRC}/baseq3/pak${basepak}.pk3 \
        ${PREFIX}/${Q3DIR}baseq3
.endfor
.for mpak in 1 2
    @${INSTALL_DATA} ${WRKSRC}/missionpack/pak${mpak}.pk3 \
        ${PREFIX}/${Q3DIR}missionpack
.endfor
    @${INSTALL} -c -o nobody -g nogroup -m 500 ${WRKSRC}/bin/x86/q3ded ${PREFIX}/${Q3DIR}
    @${INSTALL} -c -o nobody -g nogroup -m 500 ${WRKSRC}/bin/x86/quake3.x86 ${PREFIX}/${Q3DIR}

post-install:
.ifndef(NOPORTDOCS)
    @${INSTALL_DIR} ${PREFIX}/${Q3DIR}Help
    @${INSTALL_DATA} ${WRKSRC}/Help/Q3A_FAQ.html ${PREFIX}/${Q3DIR}Help
.for docs in INSTALL Q3A_EULA.txt README-Id-7-26-01.html README-linux.txt
    @${INSTALL_DATA} ${WRKSRC}/${docs} ${PREFIX}/${Q3DIR}
.endfor
.endif
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>