aboutsummaryrefslogtreecommitdiffstats
path: root/games/xscrabble/Makefile
blob: 59f62cca8b2b8fec54ed64762b2db034024502a9 (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
# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   xscrabble
PORTVERSION=    2.12
PORTREVISION=   1
CATEGORIES= games
MASTER_SITES=   ftp://ftp.ac-grenoble.fr/ge/educational_games/
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} ${PORTNAME}_en${EXTRACT_SUFX}

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    X version of the popular board game

USES=       imake
USE_BZIP2=  yes
USE_XORG=   xaw
NO_INSTALL_MANPAGES=    yes

XSCRABBLEDIR=   ${PREFIX}/lib/X11/xscrabble

post-patch:
    @${ECHO_CMD} '#define VERSION ${PORTVERSION:S/.//g}' \
        > ${WRKSRC}/src/config.h
    @${ECHO_CMD} '#define DICT_FILE "${XSCRABBLEDIR}/OSPD3.gz"' \
        >> ${WRKSRC}/src/config.h
    @${ECHO_CMD} '#define SCORE_FILE "${XSCRABBLEDIR}/scrabble_scores"' \
        >> ${WRKSRC}/src/config.h
    @${ECHO_CMD} '#define RULES_FILE "${XSCRABBLEDIR}/scrabble_rules"' \
        >> ${WRKSRC}/src/config.h
    @${SED} -e 's|/usr/share/games/scrabble/en|${XSCRABBLEDIR}|g' \
        ${WRKSRC}/../xscrabble_en/app-defaults/XScrabble_en \
        > ${WRKSRC}/XScrabble
    @${REINPLACE_CMD} -e 's|= -O|=$$(CDEBUGFLAGS)|g' ${WRKSRC}/Imakefile

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/xscrab ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/src/xscrabble ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/XScrabble ${PREFIX}/lib/X11/app-defaults
    @${MKDIR} ${XSCRABBLEDIR}
.for file in OSPD3.gz duplicate scrabble_rules scrabble_scores
    ${INSTALL_DATA} ${WRKSRC}/../xscrabble_en/lib/${file} ${XSCRABBLEDIR}
.endfor

.include <bsd.port.mk>