aboutsummaryrefslogtreecommitdiffstats
path: root/games/pyawale/Makefile
blob: 9b768ddc99ab377ec11f1559a9404aa15e69b085 (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
# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
# $FreeBSD$

PORTNAME=   pyawale
PORTVERSION=    0.4.0
PORTREVISION=   3
CATEGORIES= games python
MASTER_SITES=   http://download.gna.org/pyawale/

MAINTAINER= nemysis@gmx.ch
COMMENT=    African board game

LICENSE=    GPLv2

RUN_DEPENDS=    ${PYGAME}

USE_PYTHON= yes

PLIST_FILES=    bin/${PORTNAME} \
        share/applications/${PORTNAME}.desktop \
        share/pixmaps/${PORTNAME}.png
PLIST_DIRSTRY=  share/applications

PORTDATA=   *
PORTDOCS=   *

DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= AUTHORS ChangeLog LISEZMOI NEWS README

DOCSRCDIR2= ${WRKSRC}/docs
DOCSDIR2=   ${DOCSDIR}/docs
DOC_FILES2= *.rest *.html *.jpg

SUB_FILES=  ${PORTNAME}

.include <bsd.port.options.mk>

post-patch:
    @${FIND} ${WRKSRC} -name '*.py' | ${XARGS} \
        ${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|'
    @${FIND} ${WRKSRC} -name "*.bak" -delete

do-build:
    @${PYTHON_CMD} -m compileall ${WRKSRC}
    @${PYTHON_CMD} -O -m compileall ${WRKSRC}

do-install:
    ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
    ${MKDIR} ${DATADIR}
    @(cd ${WRKSRC}/src && ${COPYTREE_SHARE} \* ${DATADIR})
    ${INSTALL_DATA} ${WRKSRC}/docs/${PORTNAME}.png ${PREFIX}/share/pixmaps
    ${MKDIR} ${PREFIX}/share/applications
    ${INSTALL_DATA} ${WRKSRC}/docs/${PORTNAME}.desktop ${PREFIX}/share/applications
.if ${PORT_OPTIONS:MDOCS}
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
    ${MKDIR} ${DOCSDIR2}
    ${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
.endif
.include <bsd.port.mk>