aboutsummaryrefslogtreecommitdiff
path: root/games/zephulor/Makefile
blob: 16763e2b6a7a167a04489d20b509b8f48d553f25 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# New ports collection makefile for:	games/zephulor
# Date created:			8 Aug 2005
# Whom:				Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#

PORTNAME=	zephulor
PORTVERSION=	1
PORTREVISION=	1
CATEGORIES=	games
MASTER_SITES=	http://www.hollowworks.com/downloads/adventuresonplanetzephulor/files/
DISTNAME=	${PORTNAME}-source

MAINTAINER=	alepulver@FreeBSD.org
COMMENT=	Adventures on Planet Zephulor

RUN_DEPENDS=	${PYTHON_SITELIBDIR}/pygame/__init__.py:${PORTSDIR}/devel/py-game \
		${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter

USE_PYTHON=	yes
NO_BUILD=	yes

post-patch:
# Fix path to python interpreter
	@${REINPLACE_CMD} -e 's|#!.*python|#!${PYTHON_CMD}|' \
		${WRKSRC}/*.py ${WRKSRC}/maptool/*.py

# Make wrapper script
	@${ECHO_CMD} "#!/bin/sh" >> ${WRKSRC}/zephulor
	@${ECHO_CMD} '${PYTHON_CMD} ${DATADIR}/zephulor.py "$$@"' \
		>> ${WRKSRC}/zephulor

do-install:
# Wrapper script
	${INSTALL_SCRIPT} ${WRKSRC}/zephulor ${PREFIX}/bin

# Data directory
	${MKDIR} ${DATADIR}

# Executable scripts
.for f in chared maploadtool scnloadtool zephulor
	${INSTALL_SCRIPT} ${WRKSRC}/${f}.py ${DATADIR}
.endfor

# Scripts
.for f in game_config game_entities game_hud game_map game_menu \
	game_projectiles game_sound myimg
		${INSTALL_DATA} ${WRKSRC}/${f}.py ${DATADIR}
.endfor

# Documentation
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
.	for f in README manual readme-chared readme-maploadtool \
		readme-scnloadtool
			${INSTALL_DATA} ${WRKSRC}/${f}.txt ${DOCSDIR}
.	endfor
.endif

# Maptool
	${MKDIR} ${DATADIR}/maptool

# Executable scripts
.for f in chared main
	${INSTALL_SCRIPT} ${WRKSRC}/maptool/${f}.py ${DATADIR}/maptool
.endfor

# Scripts
.for f in charmenu domenu game_entities game_map hud interface keymap myimg \
	tilemenu
		${INSTALL_DATA} ${WRKSRC}/maptool/${f}.py ${DATADIR}/maptool
.endfor

# Documentation
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}/maptool
	${INSTALL_DATA} ${WRKSRC}/maptool/manual.txt ${DOCSDIR}/maptool
.endif

# Data
	${CP} -R ${WRKSRC}/data ${DATADIR}

# Fix wrong permissions
	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
	${FIND} ${DATADIR}/data -type f -print0 | \
		${XARGS} -0 ${CHMOD} ${SHAREMODE}
	${FIND} ${DATADIR}/data -type d -print0 | \
		${XARGS} -0 ${CHMOD} ${BINMODE}

.include <bsd.port.mk>