aboutsummaryrefslogtreecommitdiffstats
path: root/games/pycadia/Makefile
blob: a56d26505068b8e5069275b8b75048dd95ff29e7 (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
62
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD$

PORTNAME=   pycadia
PORTVERSION=    0.5.1
PORTREVISION=   5
CATEGORIES= games python
MASTER_SITES=   GENTOO/distfiles \
        SF/nemysisfreebsdp/games/
DIST_SUBDIR=    python

MAINTAINER= games@FreeBSD.org
COMMENT=    Home to vector gaming, Python style

LICENSE=    GPLv2

RUN_DEPENDS=    ${PYGAME}

WRKSRC=     ${WRKDIR}/${PORTNAME}

USE_GNOME=  pygtk2 libgnomeui
USE_PYTHON= 2

PORTDOCS=   CHANGELOG README gravity.txt
OPTIONS_DEFINE= DOCS

DESKTOP_ENTRIES="Pycadia" "" "${PORTNAME}" \
        "${PORTNAME}" "Game;ArcadeGame;" ""

SUB_FILES=  ${PORTNAME}.sh

post-patch:
    @${FIND} ${WRKSRC} -name "*.bak" -delete

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

do-install:
    @${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
        ${WRKDIR}/${PORTNAME}.sh
    ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh \
        ${STAGEDIR}${PREFIX}/bin/${PORTNAME}

.for d in glade pixmaps sounds
    @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
.endfor
.for f in *.py *.pyc *.pyo
    ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
.endfor

    @(cd ${STAGEDIR}${DATADIR} && ${CHMOD} 555 \
         ${PORTNAME}.py spacewarpy.py vektoroids.py)
    ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf ${STAGEDIR}${DATADIR}

    ${INSTALL_DATA} ${WRKSRC}/pixmaps/pysteroids.png \
        ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png

    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>