summaryrefslogtreecommitdiff
path: root/games/barbie_seahorse_adventures/Makefile
blob: 1614ac24a4a7ea8879e418ce2d3c2fe1556a552d (plain)
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
63
64
65
66
67
68
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD$

PORTNAME=	barbie_seahorse_adventures
PORTVERSION=	1.1
PORTREVISION=	1
CATEGORIES=	games python
MASTER_SITES=	http://www.imitationpickles.org/barbie/files/
DISTNAME=	barbie-${DISTVERSION}
DIST_SUBDIR=	python

MAINTAINER=	ports@FreeBSD.org
COMMENT=	You are a seahorse and you want to go to the moon!

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

RUN_DEPENDS=	${PYGAME}

WRKSRC=		${WRKDIR}/barbie-${DISTVERSION}

USES=		dos2unix python:2 tar:tgz
DOS2UNIX_GLOB= 	*.py
NO_BUILD=	yes

PORTDOCS=	CHANGES.txt LEVELS.txt NOTES.txt README.txt
OPTIONS_DEFINE=	DOCS

INSTALLS_ICONS=	yes
ICON_SIZES=	32x32 64x64 128x128

SUB_FILES=	${PORTNAME}

DESKTOP_ENTRIES="Barbie Seahorse Adventures" "" "${PORTNAME}" \
		"${PORTNAME}" "Game;ArcadeGame;" ""

post-extract:
	@cd ${WRKSRC} && ${RM} data/REMOVE_ME.txt data/sample.txt \
		lib/pgu/LICENSE.txt

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|' \
		${WRKSRC}/leveledit.py ${WRKSRC}/tileedit.py
	@${FIND} ${WRKSRC} -name "*.bak" -delete
.for s in 32 64 128
	@cd ${WRKSRC} && \
		${MV} icon${s}.png ${PORTNAME}_${s}x${s}.png
.endfor

do-install:
	@${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
		${WRKDIR}/${PORTNAME}
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "data lib" ${STAGEDIR}${DATADIR})
	${INSTALL_SCRIPT} ${WRKSRC}/*.py ${STAGEDIR}${DATADIR}

.for s in ${ICON_SIZES}
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps
	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}_${s}.png \
		${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
.endfor
	${LN} -sf ${PREFIX}/share/icons/hicolor/64x64/apps/${PORTNAME}.png \
		${STAGEDIR}${PREFIX}/share/pixmaps/

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

.include <bsd.port.mk>