aboutsummaryrefslogtreecommitdiffstats
path: root/games/quake2-zaero/Makefile
blob: 18a2b5c93383cfa2b105c0771aec7c4c81c4e6b1 (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
67
68
69
70
71
72
73
74
75
76
# Created by: alepulver
# $FreeBSD$

PORTNAME=   zaero
PORTVERSION=    1.1
CATEGORIES= games
MASTER_SITES=   ftp://ftp.alepulver.com.ar/distfiles/
PKGNAMEPREFIX=  ${Q2PKGNAMEPREFIX}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
        ${PORTNAME}-src-${PORTVERSION}-2${EXTRACT_SUFX}
DIST_SUBDIR=    ${PKGNAMEPREFIX}${PORTNAME}

MAINTAINER= danfe@FreeBSD.org
COMMENT=    Quake II Zaero Mission Pack

USES=       dos2unix zip
DOS2UNIX_FILES= *.[ch]
NO_WRKSUBDIR=   yes

OPTIONS_DEFINE= DEMO DM
DEMO_DESC=  Demo version of the game data
DM_DESC=    Deathmatch maps

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

NO_STAGE=   yes
.include "${.CURDIR}/../quake2-data/Makefile.include"

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDEMO}
DISTFILES+= zaerodemo${EXTRACT_SUFX}
PLIST_SUB+= DEMO=""
.else
PLIST_SUB+= DEMO="@comment "
SUB_FILES+= pkg-message
.endif

.if ${PORT_OPTIONS:MDM}
DISTFILES+= zaerodm${EXTRACT_SUFX}
PLIST_SUB+= DM=""
.else
PLIST_SUB+= DM="@comment "
.endif

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

post-patch:
    @${REINPLACE_CMD} -e 's/__linux__/__unix__/' ${WRKSRC}/q_shared.[ch]

do-install:
    ${MKDIR} ${Q2DIR}/${PORTNAME}
    ${INSTALL_PROGRAM} ${WRKSRC}/game.so ${Q2DIR}/${PORTNAME}
.if ${PORT_OPTIONS:MDEMO}
    ${INSTALL_DATA} ${WRKSRC}/zaero/pak0.pak ${Q2DIR}/${PORTNAME}
    ${MKDIR} ${Q2DIR}/${PORTNAME}/sprites
    ${INSTALL_DATA} ${WRKSRC}/zaero/sprites/* ${Q2DIR}/${PORTNAME}/sprites
.endif
    ${INSTALL_DATA} ${WRKSRC}/pak1.pak ${Q2DIR}/${PORTNAME}
.if ${PORT_OPTIONS:MDM}
    ${INSTALL_DATA} ${WRKSRC}/zaero/pak2.pak ${Q2DIR}/${PORTNAME}
.endif
.if ${PORT_OPTIONS:MDOCS}
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/changelog.txt ${DOCSDIR}
.endif

.if ! ${PORT_OPTIONS:MDEMO}
post-install:
    @${ECHO_CMD}
    @${CAT} ${PKGMESSAGE}
    @${ECHO_CMD}
.endif

.include <bsd.port.mk>