From 95683b0031261e5cb3f5c007b40ed2c41cf2e4b1 Mon Sep 17 00:00:00 2001 From: Herve Quiroz Date: Tue, 5 Apr 2005 12:30:44 +0000 Subject: - Use the ${JAR} macro provided by bsd.java.mk - Use SUB_FILES to build the launcher shell script - Improve the launcher shell script (use javavmwrapper) - Install using FIND | INSTALL_DATA - Add $FreeBSD$ tag in pkg-plist - Fix pkg-plist issue from last commit --- games/robocode/Makefile | 17 +++++++---------- games/robocode/files/robocode.sh | 5 ----- games/robocode/files/robocode.sh.in | 6 ++++++ games/robocode/pkg-plist | 3 +-- 4 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 games/robocode/files/robocode.sh create mode 100644 games/robocode/files/robocode.sh.in (limited to 'games/robocode') diff --git a/games/robocode/Makefile b/games/robocode/Makefile index 995d59412ccf..e01680355fc9 100644 --- a/games/robocode/Makefile +++ b/games/robocode/Makefile @@ -21,8 +21,6 @@ JAVA_VERSION= 1.3+ JAVA_EXTRACT= yes JAVA_RUN= yes -JAVAVM= ${JAVA_HOME}/bin/java -JAVAJAR= ${JAVA_HOME}/bin/jar DATADIR= ${JAVASHAREDIR}/${PORTNAME} USE_ZIP= yes @@ -33,17 +31,16 @@ NO_BUILD= yes INSTFILES= battles javadoc license robocode.ico \ robocode.jar robots templates versions.txt -post-extract: - @cd ${WRKSRC} && ${JAVAJAR} xf ${WRKSRC}/extract.jar +SUB_FILES= robocode.sh -do-configure: - @${SED} "s|%%PREFIX%%|${PREFIX}|g ; s|%%JAVAVM%%|${JAVAVM}|g" \ - ${FILESDIR}/robocode.sh > ${WRKDIR}/robocode.sh +post-extract: + @cd ${WRKSRC} && ${JAR} xf ${WRKSRC}/extract.jar do-install: - @${MKDIR} ${DATADIR} - @cd ${WRKSRC} && ${TAR} -c -f - ${INSTFILES} | \ - ${TAR} --unlink -x -f - -C ${DATADIR} + @cd ${WRKSRC} && \ + ${FIND} ${INSTFILES} -type d -exec ${MKDIR} ${DATADIR}/{} \; + @cd ${WRKSRC} && \ + ${FIND} ${INSTFILES} -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} \; @${INSTALL_SCRIPT} ${WRKDIR}/robocode.sh ${PREFIX}/bin/robocode .include diff --git a/games/robocode/files/robocode.sh b/games/robocode/files/robocode.sh deleted file mode 100644 index 209683d3224f..000000000000 --- a/games/robocode/files/robocode.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -cd %%PREFIX%%/share/java/robocode -exec %%JAVAVM%% -jar robocode.jar "$@" diff --git a/games/robocode/files/robocode.sh.in b/games/robocode/files/robocode.sh.in new file mode 100644 index 000000000000..d0633528a7c5 --- /dev/null +++ b/games/robocode/files/robocode.sh.in @@ -0,0 +1,6 @@ +#!/bin/sh +# +# $FreeBSD$ + +cd "%%DATADIR%%" +JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -jar robocode.jar "$@" diff --git a/games/robocode/pkg-plist b/games/robocode/pkg-plist index c2bb8b8820cc..014d2340502b 100644 --- a/games/robocode/pkg-plist +++ b/games/robocode/pkg-plist @@ -1,3 +1,4 @@ +@comment $FreeBSD$ bin/robocode %%DATADIR%%/battles/intro.battle %%DATADIR%%/battles/sample.battle @@ -96,7 +97,6 @@ bin/robocode %%DATADIR%%/robots/sample/RamFire.class %%DATADIR%%/robots/sample/RamFire.java %%DATADIR%%/robots/sample/RamFire.properties -%%DATADIR%%/robots/sample/SittingDuck.data/count.dat %%DATADIR%%/robots/sample/SittingDuck.class %%DATADIR%%/robots/sample/SittingDuck.html %%DATADIR%%/robots/sample/SittingDuck.java @@ -131,7 +131,6 @@ bin/robocode %%DATADIR%%/versions.txt @dirrm %%DATADIR%%/templates @dirrm %%DATADIR%%/robots/sampleteam -@dirrm %%DATADIR%%/robots/sample/SittingDuck.data @dirrm %%DATADIR%%/robots/sample @dirrm %%DATADIR%%/robots @dirrm %%DATADIR%%/license -- cgit v1.2.3