aboutsummaryrefslogtreecommitdiffstats
path: root/games/pachi/Makefile
blob: 16eeb30a25ec49e0a478119dcf170293d26fb16b (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
# Created by: Dmitry Marakasov <amdmi3@amdmi3.ru>
# $FreeBSD$

PORTNAME=   pachi
PORTVERSION=    1.0
PORTREVISION=   5
CATEGORIES= games
MASTER_SITES=   SF/dragontech/Pachi%20el%20marciano/Pachi%20el%20marciano%20${PORTVERSION}
DISTNAME=   pachi_source
EXTRACT_SUFX=   .tgz

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    Platform game similar to Manic Miner

USE_SDL=    mixer sdl
USES=       gmake
GNU_CONFIGURE=  yes

LDFLAGS+=   -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CPPFLAGS+=  -I${LOCALBASE}/include

WRKSRC=     ${WRKDIR}/Pachi

SCOREDIR=   /var/games/pachi
SCOREFILE=  ${SCOREDIR}/scores.dat

PLIST_FILES=    bin/${PORTNAME}
PORTDATA=   *

DESKTOP_ENTRIES="Pachi el marciano" \
        "${COMMENT}" \
        "${DATADIR}/Tgfx/icon.bmp" \
        "${PORTNAME}" \
        "Game;ActionGame;" \
        ""

post-patch:
    @${REINPLACE_CMD} -e 's|/var/lib/games/$$PACKAGE|${SCOREDIR}|' \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|SCOREDIR[^,]*|"${SCOREFILE}"|' \
        ${WRKSRC}/src/file.c
    @${REINPLACE_CMD} -e 's|:\ install-docDATA|:|' \
        ${WRKSRC}/docs/Makefile.in
    @${REINPLACE_CMD} -e 's|install-scoreDATA\ install-data-local||' \
        ${WRKSRC}/data/Makefile.in

post-install:
    ${CHGRP} games ${STAGEDIR}${PREFIX}/bin/pachi
    ${CHMOD} g+s ${STAGEDIR}${PREFIX}/bin/pachi

.include <bsd.port.mk>