aboutsummaryrefslogtreecommitdiffstats
path: root/games/awale/Makefile
blob: 4b4eb51ae6692bad06416396dec698944dc0d39a (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
# New ports collection makefile for:    awale
# Date created:     15 August 2007
# Whom:         Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   awale
PORTVERSION=    1.5
CATEGORIES= games
MASTER_SITES=   SAVANNAH

MAINTAINER= ports@FreeBSD.org
COMMENT=    African board game

OPTIONS_DEFINE= GUI DOCS
OPTIONS_DEFAULT=    GUI
GUI_DESC=   Installs Tcl/Tk GUI

MAN6=       ${PORTNAME}.6

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGUI}
USE_TK_WRAPPER= yes
MAN6+=      x${PORTNAME}.6
PLIST_SUB+= GUI=""
.else
PLIST_SUB+= GUI="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e '/bin\/bash/d' ${WRKSRC}/src/xawale.tcl
    @${ECHO_CMD} "#!/bin/sh" > ${WRKSRC}/src/x${PORTNAME}
    @${ECHO_CMD} "${DATADIR}/xawale.tcl" >> ${WRKSRC}/src/x${PORTNAME}

do-build:
    (cd ${WRKSRC}/src && ${CC} ${CFLAGS} -o ${PORTNAME} ${PORTNAME}.c)

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.6 ${MAN6PREFIX}/man/man6
    @${MKDIR} ${DATADIR}
.for f in README *.bmp *.gif *.ico *.png
    ${INSTALL_DATA} ${WRKSRC}/src/${f} ${DATADIR}
.endfor
.if ${PORT_OPTIONS:MGUI}
    ${INSTALL_SCRIPT} ${WRKSRC}/src/x${PORTNAME} ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/man/x${PORTNAME}.6 ${MAN6PREFIX}/man/man6
    ${INSTALL_SCRIPT} ${WRKSRC}/src/xawale.tcl ${DATADIR}
.endif
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
.for f in AUTHORS ChangeLog NEWS README THANKS
    cd ${WRKSRC} && ${INSTALL_DATA} ${f} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>