aboutsummaryrefslogtreecommitdiffstats
path: root/games/quake2-ctf/Makefile
blob: 58b9817c976a9b41c1ef4f08598e5fdb69c7e7da (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
# Created by: Alejandro Pulver <alepulver@FreeBSD.org>
# $FreeBSD$

PORTNAME=   ctf
PORTVERSION=    1.52
CATEGORIES= games
MASTER_SITES=   ${MASTER_SITE_IDSOFTWARE:S|$|:data|} \
        http://offload1.icculus.org/quake2/files/:src
MASTER_SITE_SUBDIR= quake2/ctf/:data
PKGNAMEPREFIX=  ${Q2PKGNAMEPREFIX}
DISTFILES=  ${CTF_DATA}:data \
        ${CTF_SRC}:src
DIST_SUBDIR=    quake2lnx

MAINTAINER= ports@FreeBSD.org
COMMENT=    Quake II CTF (Capture The Flag) mod

USES=       dos2unix zip:infozip
DOS2UNIX_FILES= ../../../ctf/readme.txt ../../../ctf/server.cfg
WRKSRC=     ${WRKDIR}/${CTF_SRC:S/.tar.gz//}/src/ctf

DOCSDIR=    ${PREFIX}/share/doc/${LATEST_LINK}
LATEST_LINK=    ${PKGNAMEPREFIX}${PORTNAME}

CTF_DATA=   q2ctf150.zip
CTF_SRC=    quake2-r0.16.2.tar.gz

OPTIONS_DEFINE= DOCS

.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.options.mk>

do-extract:
    @${MKDIR} ${WRKDIR}
    @${TAR} zxf ${DISTDIR}/${DIST_SUBDIR}/${CTF_SRC} -C ${WRKDIR} \
        --include "${CTF_SRC:S/.tar.gz//}/src/ctf/*"
    @${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} -d ${WRKDIR}/ctf \
        ${DISTDIR}/${DIST_SUBDIR}/${CTF_DATA} -x *.dll *.ico

post-extract:
    @${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}

do-install:
    @${MKDIR} ${STAGEDIR}${Q2DIR}/ctf
    ${INSTALL_PROGRAM} ${WRKSRC}/game.so ${STAGEDIR}${Q2DIR}/ctf
.for f in *.cfg *.pak
    ${INSTALL_DATA} ${WRKDIR}/ctf/${f} ${STAGEDIR}${Q2DIR}/ctf
.endfor
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKDIR}/ctf/readme.txt ${STAGEDIR}${DOCSDIR}
.endif

.include <bsd.port.mk>