summaryrefslogtreecommitdiff
path: root/games/robocode/Makefile
blob: 51672cc27197e432195bea9dac3c16f4c1ecda46 (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
# New ports collection makefile for:    robocode
# Date created:				10 September 2001
# Whom:					Maxim Sobolev <sobomax@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	robocode
PORTVERSION=	1.0.6
CATEGORIES=	games java
MASTER_SITES=	ftp://dragon.adtech.internet.ibm.com/pub/robocode/
DISTNAME=	robocode-setup-${PORTVERSION}
EXTRACT_SUFX=	.jar

MAINTAINER=	sobomax@FreeBSD.org
COMMENT=	A game for learning Java[tm] programming language

USE_JAVA=	1.3+

JAVAVM=		${JAVA_HOME}/bin/java
JAVAJAR=	${JAVA_HOME}/bin/jar

USE_ZIP=	yes
USE_XLIB=	yes
RESTRICTED=	"Redistribution isn't permitted - see license for details"
NO_WRKSUBDIR=	yes
NO_BUILD=	yes

INSTFILES=	battles javadoc license.html robocode.ico \
		robocode.jar robots templates versions.txt

.if defined(BATCH) || defined(PACKAGE_BUILDING)
IGNORE=		"You can not legally redistribute package"
.endif

post-extract:
	@cd ${WRKSRC} && ${JAVAJAR} xf ${WRKSRC}/extract.jar

do-configure:
	@${SED} "s|%%PREFIX%%|${PREFIX}|g ; s|%%JAVAVM%%|${JAVAVM}|g" \
		${FILESDIR}/robocode.sh > ${WRKDIR}/robocode.sh

do-install:
	@${MKDIR} ${PREFIX}/share/java/robocode
	@cd ${WRKSRC} && ${TAR} -c -f - ${INSTFILES} | \
		${TAR} --unlink -x -f - -C ${PREFIX}/share/java/robocode
	@${INSTALL_SCRIPT} ${WRKDIR}/robocode.sh ${PREFIX}/bin/robocode

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>