aboutsummaryrefslogtreecommitdiffstats
path: root/games/mopesnake/Makefile
blob: 2d2aea94ce6caa8c9df215832d6245662c7b922c (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
# New Ports collection makefile for:    mopesnake
# Date created:        2012-05-16
# Whom:                nemysis@gmx.ch
#
# $FreeBSD$
#

PORTNAME=   mopesnake
PORTVERSION=    0.5
CATEGORIES= games
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
DISTNAME=   ${PORTNAME}-pc-${DISTVERSION}

MAINTAINER= nemysis@gmx.ch
COMMENT=    A classic snake game in which you attempt to eat all the pain

LICENSE=    GPLv2

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

USE_ZIP=    yes
USE_PYTHON= yes
NO_BUILD=   yes

PLIST_FILES=    bin/mopesnake \
        share/pixmaps/${PORTNAME}.png

PORTDATA=   *
PORTDOCS=   TODO.txt index.html

post-patch:
# Fix path to python interpreter
    @${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \
        ${WRKSRC}/*.py ${WRKSRC}/mopelib/*.py
    @(cd ${WRKSRC} && ${RM} *.py.bak mopelib/*py.bak)

do-install:
# Scripts
    @${PRINTF} "#!/bin/sh\n\ncd ${DATADIR} &&\
        ./${PORTNAME}.py\n" > ${WRKDIR}/${PORTNAME}.sh
    ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME}

# Executable
    ${MKDIR} ${DATADIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${DATADIR}

# Data
    @(cd ${WRKSRC} && ${COPYTREE_SHARE} "images mopelib music sounds" ${DATADIR})

# Pixmaps and version
    ${INSTALL_DATA} ${WRKSRC}/doc/screenshot1.png ${PREFIX}/share/pixmaps/${PORTNAME}.png
    ${INSTALL_DATA} ${WRKSRC}/version ${DATADIR}

# Documentation
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.  for f in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}
.  endfor
.endif

.include <bsd.port.mk>