aboutsummaryrefslogtreecommitdiffstats
path: root/games/java-games-suite
diff options
context:
space:
mode:
authorjgh <jgh@FreeBSD.org>2013-06-21 14:37:05 +0800
committerjgh <jgh@FreeBSD.org>2013-06-21 14:37:05 +0800
commitb81bc4bf3f5f5f3dff1569a35d65cc6d0513f5af (patch)
tree62384687aad84d4219c88e1c3bbc402e552fc1db /games/java-games-suite
parentb34148d7dad0fef1041552086f161d71d267aa46 (diff)
downloadfreebsd-ports-gnome-b81bc4bf3f5f5f3dff1569a35d65cc6d0513f5af.tar.gz
freebsd-ports-gnome-b81bc4bf3f5f5f3dff1569a35d65cc6d0513f5af.tar.zst
freebsd-ports-gnome-b81bc4bf3f5f5f3dff1569a35d65cc6d0513f5af.zip
Simple Java games collection developed by Greg Cawthorne
Current game list is: Tetris: Tetris, currently in beta MM: MasterMind Reversi: Commonly known as Othello. Mine: MineSweeper RT: Reaction Tester Number: Number guessing game WWW: http://sourceforge.net/projects/javagamessuite
Diffstat (limited to 'games/java-games-suite')
-rw-r--r--games/java-games-suite/Makefile47
-rw-r--r--games/java-games-suite/distinfo2
-rw-r--r--games/java-games-suite/files/java-games-suite.sh.in25
-rw-r--r--games/java-games-suite/pkg-descr12
4 files changed, 86 insertions, 0 deletions
diff --git a/games/java-games-suite/Makefile b/games/java-games-suite/Makefile
new file mode 100644
index 000000000000..95ab5e04e63c
--- /dev/null
+++ b/games/java-games-suite/Makefile
@@ -0,0 +1,47 @@
+# Created by: Jason Helfman <jgh@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= java-games-suite
+PORTVERSION= 1.0
+CATEGORIES= games java
+MASTER_SITES= SF/javagamessuite
+
+MAINTAINER= jgh@FreeBSD.org
+COMMENT= Simple Java games collection
+
+USE_JAVA= yes
+JAVA_VERSION= 1.6+
+PLIST_FILES= bin/java-games-suite \
+ %%JAVAJARDIR%%/MM.jar \
+ %%JAVAJARDIR%%/reversi.jar \
+ %%JAVAJARDIR%%/Mine.jar \
+ %%JAVAJARDIR%%/Tetris.jar \
+ %%JAVAJARDIR%%/RT.jar \
+ %%JAVAJARDIR%%/Number.jar
+SUB_FILES= ${PORTNAME}.sh
+GAMES= MM reversi Mine Tetris RT Number
+
+post-extract-script:
+.for game in ${GAMES}
+ @${ECHO_CMD} "Main-Class: ${game}" > ${WRKSRC}/${game}/MANIFEST.MF
+.endfor
+
+do-build:
+.for game in ${GAMES}
+ cd ${WRKSRC}/${game} && \
+ ${JAVAC} ${game}.java
+.endfor
+
+post-build-script:
+.for game in ${GAMES}
+ @cd ${WRKSRC}/${game} && \
+ ${JAR} -cfm ${game}.jar MANIFEST.MF ${game}.java ${game}.class
+.endfor
+
+do-install:
+.for game in ${GAMES}
+ ${INSTALL_DATA} ${WRKSRC}/${game}/${game}.jar ${JAVAJARDIR}
+.endfor
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/games/java-games-suite/distinfo b/games/java-games-suite/distinfo
new file mode 100644
index 000000000000..834bd963aa90
--- /dev/null
+++ b/games/java-games-suite/distinfo
@@ -0,0 +1,2 @@
+SHA256 (java-games-suite-1.0.tar.gz) = 9a58681bf96872cdb542c7958dbeae6bf7cfa3a4f5b6dfa15245654777df348a
+SIZE (java-games-suite-1.0.tar.gz) = 12779
diff --git a/games/java-games-suite/files/java-games-suite.sh.in b/games/java-games-suite/files/java-games-suite.sh.in
new file mode 100644
index 000000000000..b40581e68a3a
--- /dev/null
+++ b/games/java-games-suite/files/java-games-suite.sh.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+case "$1" in
+ mastermind)
+ JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/MM.jar"
+ ;;
+ reversi)
+ JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/reversi.jar"
+ ;;
+ mine)
+ JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/Mine.jar"
+ ;;
+ tetris)
+ JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/Tetris.jar"
+ ;;
+ rt)
+ JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/RT.jar"
+ ;;
+ number)
+ JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/Number.jar"
+ ;;
+ *)
+ echo $"Usage: $0 {mastermind|reversi|mine|tetris|rt|number}"
+ exit 1
+esac
diff --git a/games/java-games-suite/pkg-descr b/games/java-games-suite/pkg-descr
new file mode 100644
index 000000000000..b5ff763efd40
--- /dev/null
+++ b/games/java-games-suite/pkg-descr
@@ -0,0 +1,12 @@
+Simple Java games collection developed by Greg Cawthorne
+
+Current game list is:
+
+Tetris: Tetris, currently in beta
+MM: MasterMind
+Reversi: Commonly known as Othello.
+Mine: MineSweeper
+RT: Reaction Tester
+Number: Number guessing game
+
+WWW: http://sourceforge.net/projects/javagamessuite