Bug 93103 - New Port: games/sfbol
Summary: New Port: games/sfbol
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Herve Quiroz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-09 20:20 UTC by Peter Thoenen
Modified: 2006-02-14 14:25 UTC (History)
0 users

See Also:


Attachments
sfbol.shar.txt (3.31 KB, text/plain)
2006-02-11 20:18 UTC, Peter Thoenen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Thoenen 2006-02-09 20:20:04 UTC
New Port: game/sfbol - Star Fleet Battles Online

I need an entry added to ports/LEGAL also .. see RESTRICTED=
--0-83542150-1139516372=:77931
Content-Type: text/plain; name="sfbol.shar.txt"
Content-Description: 4155585197-sfbol.shar.txt
Content-Disposition: inline; filename="sfbol.shar.txt"

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	sfbol
#	sfbol/files
#	sfbol/files/sfbol.sh.in
#	sfbol/pkg-descr
#	sfbol/Makefile
#	sfbol/distinfo
#
echo c - sfbol
mkdir -p sfbol > /dev/null 2>&1
echo c - sfbol/files
mkdir -p sfbol/files > /dev/null 2>&1
echo x - sfbol/files/sfbol.sh.in
sed 's/^X//' >sfbol/files/sfbol.sh.in << 'END-of-sfbol/files/sfbol.sh.in'
X#!/bin/sh
X
Xexport JAVA_VERSION
X
XJAVA_VERSION="%%JAVA_PORT_VERSION%%"
XJAVA="%%JAVA%%"
XHOME_DIR="${HOME}/SFB_Online_XP"
X
Xif [ -d ${HOME_DIR} ]; then
X	cd ${HOME_DIR} && exec ${HOME_DIR}/SFB_Online_XP
Xelse
X	cd ${HOME} && exec ${JAVA} -jar %%DISTDIR%%/install40.jar
Xfi
X
END-of-sfbol/files/sfbol.sh.in
echo x - sfbol/pkg-descr
sed 's/^X//' >sfbol/pkg-descr << 'END-of-sfbol/pkg-descr'
XStar Fleet Battles Online (SFBOL) is developed in cooperation with Amarillo 
XDesign Bureau, Inc. to be a Star Fleet Battles game service. Subscribers are
Xable to play SFB games over the internet with other subscribers around the world
X. SFBOL is designed to allow subscribers to compete in an environment that
Xemulates face to face play. The difference is the computer interface which
Xaugments or automates many of the mundane tasks of game play such as energy
Xallocation, moving counters across the map, dice rolling and damage allocation. 
XSubscribers may play as many games as they like during their subscription period
X. Throughout the year Symbiotic Games will host exclusive online Rated Ace 
XTournaments and subscribers can also compete year round via an online ranking 
Xsystem.
X
XSFBOL Authors: Symbiotic Games
XWWW: http://www.sfbonline.com,
X
XSFB Authors: Amarillo Design Bureau
XWWW: http://www.starfleetgames.com
END-of-sfbol/pkg-descr
echo x - sfbol/Makefile
sed 's/^X//' >sfbol/Makefile << 'END-of-sfbol/Makefile'
X# New ports collection makefile for:    sfbol
X# # Date created:                       2006-02-09
X# # Whom:                              eol1@yahoo.com
X# #
X# # $FreeBSD$
X# #
X#
X
XPORTNAME=	sfbol
XPORTVERSION=	4.18
XCATEGORIES=	games java
XMASTER_SITES=	http://www.sfbonline.com/install4/InstData/Java/
XDISTNAME=	install40
XEXTRACT_SUFX=	.jar
XEXTRACT_ONLY=
X
XMAINTAINER=	eol1@yahoo.com
XCOMMENT=	Star Fleet Battles Online
X
XIGNOREFILES=	install40.jar
XUSE_JAVA=	yes
XJAVA_VERSION=	1.4+
XJAVA_RUN=	yes
XNO_BUILD=	yes
X
XSUB_FILES=	sfbol.sh
XSUB_LIST+=	JAVA=${JAVA} JAVA_PORT_VERSION=${JAVA_PORT_VERSION} \
X		DISTDIR=${DISTDIR}
X
XPLIST_FILES=	bin/${PORTNAME}
X
XDESKTOP_ENTRIES=	"SFBOL" "Star Fleet Battles Online" \
X			"~/SFB_Online_XP/sfbicon.ico" \
X			"sfbol" "Application;Game;BoardGame;StrategyGame" \
X			false
X
XRESTRICTED=	Commerical software.  Licenses does not allow redistribution.
X
Xdo-install:
X	@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME:L}
X
X.include <bsd.port.mk>
END-of-sfbol/Makefile
echo x - sfbol/distinfo
sed 's/^X//' >sfbol/distinfo << 'END-of-sfbol/distinfo'
XMD5 (install40.jar) = IGNORE
XSHA256 (install40.jar) = IGNORE
END-of-sfbol/distinfo
exit


--0-83542150-1139516372=:77931--
Comment 1 Herve Quiroz freebsd_committer freebsd_triage 2006-02-10 11:37:44 UTC
Responsible Changed
From-To: freebsd-ports-bugs->hq

I'll handle this.
Comment 2 Herve Quiroz freebsd_committer freebsd_triage 2006-02-10 11:56:32 UTC
State Changed
From-To: open->feedback

Many of the suggestions in PR 93102 could be applied here as well. 

Moreover, the port should install the install40.jar file into ${DATADIR} 
because files in ${DISTDIR} are meant to be used at port install time only.
Comment 3 Peter Thoenen 2006-02-11 20:18:12 UTC
Fixed hopefully (including comments from 93102).

Reason I was doing ${DISTDIR} for install was the entire port is one
file and didn't seem practical to have two copies of the same file
laying around taking up space.  On the bright side, doing ${DATADIR}
does let me fix an icon issue.

General question: anyway to tell make NOT to display an error warning? 
-@cd && ${JAR} will ignore the error code (and not display the error
itself) BUT will still display the fact that an error was generated.
Comment 4 Hervé Quiroz 2006-02-13 14:54:24 UTC
Hi Peter,

On Sat, Feb 11, 2006 at 08:20:11PM +0000, Peter Thoenen wrote:
>  General question: anyway to tell make NOT to display an error warning? 
>  -@cd && ${JAR} will ignore the error code (and not display the error
>  itself) BUT will still display the fact that an error was generated.

I would do a simple @command | ${TRUE}

>  XPLIST_FILES=	bin/${PORTNAME}

The files installed in ${DATADIR} are missing. And the ${DATADIR}
directory itself is missing (use PLIST_DIRS here).

>  XDESKTOP_ENTRIES=	"SFBOL" "Star Fleet Battles Online" \
>  X			"${DATADIR}/sfbicon.ico" \
>  X			"sfbol" "Application;Game;BoardGame;StrategyGame" \
>  X			false

false -> ${FALSE}

>  X	@-cd ${WRKDIR} && ${JAR} -xf ${DISTDIR}/${DISTFILES} D_/SFBOL/dist/core.jar 2>/dev/null

See above.

Here is a new patch for you to review with the above suggested changes.
I also added a $FreeBSD$ tag in the launcher script, and have it set
${JAVA_VERSION} before launching the JVM.

Herve


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	sfbol
#	sfbol/files
#	sfbol/files/sfbol.sh.in
#	sfbol/pkg-descr
#	sfbol/Makefile
#	sfbol/distinfo
#
echo c - sfbol
mkdir -p sfbol > /dev/null 2>&1
echo c - sfbol/files
mkdir -p sfbol/files > /dev/null 2>&1
echo x - sfbol/files/sfbol.sh.in
sed 's/^X//' >sfbol/files/sfbol.sh.in << 'END-of-sfbol/files/sfbol.sh.in'
X#!/bin/sh
X#
X# $FreeBSD$
X
XHOME_DIR="${HOME}/SFB_Online_XP"
Xexport JAVA_VERSION="%%JAVA_VERSION%%"
X
Xif [ -d ${HOME_DIR} ]; then
X	cd ${HOME_DIR} && exec ${HOME_DIR}/SFB_Online_XP
Xelse
X	cd ${HOME} && exec "%%LOCALBASE%%/bin/java" -jar "%%DATADIR%%/install40.jar"
Xfi
X
END-of-sfbol/files/sfbol.sh.in
echo x - sfbol/pkg-descr
sed 's/^X//' >sfbol/pkg-descr << 'END-of-sfbol/pkg-descr'
XStar Fleet Battles Online (SFBOL) is developed in cooperation with Amarillo 
XDesign Bureau, Inc. to be a Star Fleet Battles game service. Subscribers are
Xable to play SFB games over the internet with other subscribers around the world
X. SFBOL is designed to allow subscribers to compete in an environment that
Xemulates face to face play. The difference is the computer interface which
Xaugments or automates many of the mundane tasks of game play such as energy
Xallocation, moving counters across the map, dice rolling and damage allocation. 
XSubscribers may play as many games as they like during their subscription period
X. Throughout the year Symbiotic Games will host exclusive online Rated Ace 
XTournaments and subscribers can also compete year round via an online ranking 
Xsystem.
X
XSFBOL Authors: Symbiotic Games
XWWW: http://www.sfbonline.com,
X
XSFB Authors: Amarillo Design Bureau
XWWW: http://www.starfleetgames.com
END-of-sfbol/pkg-descr
echo x - sfbol/Makefile
sed 's/^X//' >sfbol/Makefile << 'END-of-sfbol/Makefile'
X# New ports collection makefile for: sfbol
X# Date created:                      06FEB11
X# Whom:                              peter.thoenen@yahoo.com
X#
X# $FreeBSD$
X
XPORTNAME=	sfbol
XPORTVERSION=	4.18
XCATEGORIES=	games java
XMASTER_SITES=	http://www.sfbonline.com/install4/InstData/Java/
XDISTNAME=	install40
XEXTRACT_SUFX=	.jar
XEXTRACT_ONLY=
X
XMAINTAINER=	peter.thoenen@yahoo.com
XCOMMENT=	Star Fleet Battles Online
X
XIGNOREFILES=	install40.jar
XUSE_JAVA=	yes
XJAVA_VERSION=	1.4+
XNO_BUILD=	yes
X
XDATADIR=	${JAVASHAREDIR}/${PORTNAME}
X
XSUB_FILES=	sfbol.sh
X
XPLIST_FILES=	bin/${PORTNAME} \
X		%%DATADIR%%/${DISTFILES} \
X		%%DATADIR%%/sfbicon.ico
XPLIST_DIRS=	%%DATADIR%%
X
XDESKTOP_ENTRIES=	"SFBOL" "Star Fleet Battles Online" \
X			"${DATADIR}/sfbicon.ico" \
X			"sfbol" "Application;Game;BoardGame;StrategyGame" \
X			${FALSE}
X
XRESTRICTED=	Commerical software.  Licenses does not allow redistribution.
X
Xpost-patch:
X	@cd ${WRKDIR} && ${JAR} -xf ${DISTDIR}/${DISTFILES} D_/SFBOL/dist/core.jar 2>/dev/null | ${TRUE}
X	@cd ${WRKDIR} && ${JAR} -xf D_/SFBOL/dist/core.jar sfbicon.ico
X
Xdo-install:
X	@${MKDIR} ${DATADIR}
X	@${INSTALL_DATA} ${WRKDIR}/sfbicon.ico ${DATADIR}
X	@${INSTALL_DATA} ${DISTDIR}/${DISTFILES} ${DATADIR}
X	@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME:L}
X
X.include <bsd.port.mk>
END-of-sfbol/Makefile
echo x - sfbol/distinfo
sed 's/^X//' >sfbol/distinfo << 'END-of-sfbol/distinfo'
XMD5 (install40.jar) = IGNORE
XSHA256 (install40.jar) = IGNORE
END-of-sfbol/distinfo
exit
Comment 5 Peter Thoenen 2006-02-14 00:43:29 UTC
Looks good and thanks for cleaning it up.  First time ever tried to
port a java app.  Its a PITA to say the least :).  See 93102 comments.
Comment 6 Herve Quiroz freebsd_committer freebsd_triage 2006-02-14 14:25:02 UTC
State Changed
From-To: feedback->closed

New port added. 

Thanks for your contribution!