aboutsummaryrefslogtreecommitdiffstats
path: root/games/freedoko/Makefile
blob: bf94b8443ae118f1abce0ebd4f3ccf4c4c43ea52 (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: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   freedoko
PORTVERSION=    0.7.12
CATEGORIES= games
MASTER_SITES=   SF/free-doko/FreeDoko%20source
DISTNAME=   FreeDoko_${PORTVERSION}.src

MAINTAINER= games@FreeBSD.org
COMMENT=    Play the card game Doppelkopf

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/../COPYING

LIB_DEPENDS=    libgnet-2.0.so:${PORTSDIR}/net/gnet2

WRKSRC=     ${WRKDIR}/${DISTNAME:C/\.src$//}/src

USES=       gmake pkgconfig zip:infozip
USE_GNOME=  gtkmm24
MAKE_ENV=   OS="${OPSYS}" DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}"

PLIST_FILES=    bin/FreeDoko bin/freedoko
PORTDOCS=   *
PORTDATA=   *

OPTIONS_DEFINE= DOCS

post-patch:
    @${FIND} ${WRKSRC} -name "*Makefile*" | ${XARGS} ${REINPLACE_CMD} -e \
        's|\.\./data|$$(DATADIR)|g ; \
         s|\.\./doc/manual|$$(DOCSDIR)/manual|g ; \
         s|@echo $$(CXX)|@true $$(CXX)|g ; \
         s|@$$(CXX)|$$(CXX)|g ; \
         s|make -C|$$(MAKE) -C|g'
    @${REINPLACE_CMD} -e '/\/X11\//d ; \
         s|/usr/local/|${LOCALBASE}/|g' ${WRKSRC}/misc/setting.cpp

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/FreeDoko ${STAGEDIR}${PREFIX}/bin
    ${LN} -sf FreeDoko ${STAGEDIR}${PREFIX}/bin/freedoko
    @${MKDIR} ${STAGEDIR}${DATADIR}
.for file in icon.png logo.png
    ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DATADIR}
.endfor
.for dir in backgrounds cardsets rules translations
    cd ${WRKSRC}/../data && ${FIND} ${dir} ! -name "*Makefile*" | \
        ${CPIO} --quiet -pdum ${STAGEDIR}${DATADIR}
.endfor
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC}/../doc/manual && ${FIND} . | \
        ${CPIO} --quiet -pdum ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>