aboutsummaryrefslogtreecommitdiffstats
path: root/games/pysycache/Makefile
blob: dd47dd6668ec1245626c4d638bce72a77f81fc56 (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
61
# New ports collection makefile for:    pysycache
# Date created:     2006-02-22
# Whom:         Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
#
# $FreeBSD$
#

PORTNAME=   pysycache
PORTVERSION=    2.0
PORTREVISION=   4
CATEGORIES= games python
MASTER_SITES=   http://download.gna.org/py4childs/${PORTNAME}/v${PORTVERSION}/
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= acm@FreeBSD.org
COMMENT=    Educational software made in python

RUN_DEPENDS=    ${PYTHON_SITELIBDIR}/pygame/__init__.py:${PORTSDIR}/devel/py-game

USE_ZIP=    yes
USE_PYTHON= yes
NO_BUILD=   yes

WRKSRC= ${WRKDIR}/${PORTNAME}
SUB_FILES=  pkg-message

post-patch:
    @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/datas.py ${WRKSRC}/datas.py \
        ${WRKSRC}/datasclass.py ${WRKSRC}/pysybuttons.py ${WRKSRC}/pysyclick.py ${WRKSRC}/pysymove.py \
        ${WRKSRC}/pysycache.py
    @${FIND} ${WRKSRC} -type d -name CVS -type d -print0 | ${XARGS} -0 ${RM} -R
    @${FIND} ${WRKSRC} -name '*.orig' -delete
    @${FIND} ${WRKSRC} -name '*.bak' -delete

do-install:
    @${INSTALL_SCRIPT} ${WRKSRC}/pysycache.py ${PREFIX}/bin/pysycache.py
    @${RM} ${WRKSRC}/pysycache.py
.for DIRE in fonts help images sounds themes-buttons themes-click themes-move
    @${MKDIR} ${DATADIR}/${DIRE}
    @cd ${WRKSRC}/${DIRE} && \
        ${FIND} * -type d -exec ${MKDIR} "${DATADIR}/${DIRE}/{}" \; && \
        ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DATADIR}/${DIRE}/{}" \;
.endfor
.for FILE in *.py *.pyc *.txt *.png
    @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DATADIR}
.endfor

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for FILE in AUTHORS ChangeLog NEWS README
    @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
    @cd ${WRKSRC}/doc/pysycache && \
        ${FIND} * -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
        ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
.endif

    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>