summaryrefslogtreecommitdiffstats
path: root/games/endgame-singularity/Makefile
blob: 58486a84d7fb5d19dc19210a65cfae6317631c7d (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
# New ports collection makefile for:	endgame-singularity
# Date created:		10 August 2007
# Whom:			Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	singularity
DISTVERSION=	0.27
CATEGORIES=	games
MASTER_SITES=	http://emhsoft.com/singularity/ CENKES
PKGNAMEPREFIX=	endgame-
DISTNAME=	${PORTNAME}_${DISTVERSION}

MAINTAINER=	infofarmer@FreeBSD.org
COMMENT=	Simulates the life of a true AI

RUN_DEPENDS=	py*-game>=1.7.1:${PORTSDIR}/devel/py-game

USE_PYDISTUTILS=yes
USE_PYTHON=	yes
USE_SDL=	image mixer
PYDISTUTILS_PKGVERSION=	${DISTVERSION}
WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}
PORTDOCS=	AUTHORS Changelog README.txt TODO

post-extract:
	@${FIND} ${WRKSRC} -name '*.pyc' -delete
	@cd ${WRKSRC}/&&${MV} code ${PORTNAME}
	@${MKDIR} ${WRKSRC}/data/music/
	@${TOUCH} ${WRKSRC}/data/music/.keep_me

post-patch:
	@${REINPLACE_CMD} -e '/py2exe/d;s|console.*|packages=["${PORTNAME}"],|;\
		/name=/s|=.*|="${PORTNAME}",|' ${WRKSRC}/setup.py
	@${REINPLACE_CMD} -e '/data_loc = /s|=.*|= "${DATADIR}/"|;\
		/data_loc.*music/s|, ".."||' ${WRKSRC}/${PORTNAME}/g.py

post-build:
	@${ECHO_CMD} '#!${PYTHON_CMD}' > ${WRKSRC}/${PORTNAME}.py
	@${ECHO_CMD} 'import ${PORTNAME}.${PORTNAME}' >> ${WRKSRC}/${PORTNAME}.py

post-install:
	@cd ${WRKSRC}/data/&&${COPYTREE_SHARE} . ${DATADIR}/
	@${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${PREFIX}/bin/${PORTNAME}
.ifndef NOPORTDOCS
	@${INSTALL} -d ${DOCSDIR}/
	@cd ${WRKSRC}/&&${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud