aboutsummaryrefslogtreecommitdiffstats
path: root/games/pydance/Makefile
blob: 75f5c697af889b62cb7b8c06ef3deb897ae384c8 (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
# Created by: Rudolf Polzer <freebsd-dr@durchnull.de>
# $FreeBSD$

PORTNAME=   pydance
PORTVERSION=    1.1.0
PORTREVISION=   5
CATEGORIES= games
MASTER_SITES=   http://people.freebsd.org/~sylvio/pydance/ \
        http://icculus.org/pyddr/ \
        http://offload1.icculus.org/pyddr/ \
        http://www.informatik.uni-frankfurt.de/~polzer/distfiles/
DISTFILES=  ${PORTNAME}-${PORTVERSION}.tar.gz ${SONGS}
DIST_SUBDIR=    pydance
EXTRACT_ONLY=   ${PORTNAME}-${PORTVERSION}.tar.gz

MAINTAINER= ports@FreeBSD.org
COMMENT=    Dancing simulation game similar to the kind in arcades

BUILD_DEPENDS=  ${PYGAME}
RUN_DEPENDS=    ${PYGAME}

USES=       python
USE_PYTHON= distutils noegginfo
SUB_FILES=  pkg-message

SONGS=      forkbomb.ogg forkbomb.dance forkbomb-bg.jpg forkbomb-banner.png \
        6jan.ogg 6jan.dance 6jan-bg.jpg 6jan-banner.png synrg.ogg \
        synrg.dance synrg-bg.png pydance-cdtitle.png

DOCFILES=   BUGS CREDITS ChangeLog HACKING INSTALL LICENSE README TODO \
        docs/dance-spec.txt docs/dwi-hall-of-shame.txt \
        docs/ksf-format.txt docs/manual.html

OPTIONS_DEFINE= DOCS

post-patch:
    ${REINPLACE_CMD} -e "s,/etc,${LOCALBASE}/etc," ${WRKSRC}/constants.py
do-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/share/games/pydance/songs
    ${INSTALL_SCRIPT} ${WRKSRC}/utils/findbpm.py ${STAGEDIR}${PREFIX}/bin/findbpm
    (cd ${WRKSRC} && for MODULE in *.py; do test "$$MODULE" = "setup.py" -o \
        "$$MODULE" = "pydance.py" || ${INSTALL_DATA} $$MODULE \
        ${STAGEDIR}${PREFIX}/share/games/pydance/$$MODULE || exit 1; done)
    ${INSTALL_SCRIPT} ${WRKSRC}/pydance.py ${STAGEDIR}${PREFIX}/share/games/pydance
    (cd ${WRKSRC} && ${COPYTREE_SHARE} "themes images sound" \
        ${STAGEDIR}${PREFIX}/share/games/pydance)
    ${INSTALL_MAN} ${WRKSRC}/docs/man/findbpm.1 ${STAGEDIR}${MANPREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/docs/man/pydance.6 ${STAGEDIR}${MANPREFIX}/man/man6
    ${LN} -sf ${PREFIX}/share/games/pydance/pydance.py \
        ${STAGEDIR}${PREFIX}/bin/pydance
    ${INSTALL_DATA} ${WRKSRC}/pydance.posix.cfg \
        ${STAGEDIR}${PREFIX}/etc/pydance.cfg.sample
    (cd ${_DISTDIR} && ${INSTALL_DATA} ${SONGS} \
        ${STAGEDIR}${PREFIX}/share/games/pydance/songs)
    (cd ${STAGEDIR}${PREFIX}/share/games/pydance/songs && ${MV} \
        pydance-cdtitle.png pydance.png)
    @${MKDIR} ${STAGEDIR}${DOCSDIR}/images
    (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCFILES} ${STAGEDIR}${DOCSDIR})
    (cd ${WRKSRC}/docs && ${COPYTREE_SHARE} images ${STAGEDIR}${DOCSDIR})

.include <bsd.port.mk>