Update to 1.38.

PR:		ports/91978
Submitted by:	Lars Engels <lars dot engels at 0x20 dot net> (maintainer)
This commit is contained in:
Mark Linimon 2006-01-29 05:10:40 +00:00
parent 426af3f595
commit ac1c0d5635
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=154704
4 changed files with 81 additions and 39 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= hattrickorganizer
PORTVERSION= 1.36
PORTVERSION= 1.38
CATEGORIES= games java
MASTER_SITES= http://www.wow-auctions.net/ho/download/ \
http://www.bsd-geek.de/FreeBSD/distfiles/
@ -17,16 +17,19 @@ COMMENT= A management tool for Hattrick.org written in Java
EXTRACT_AFTER_ARGS= -d ${WRKSRC}
USE_ZIP= yes
NO_BUILD= yes
USE_JAVA= yes
JAVA_VERSION= 1.4+
USE_ZIP= yes
NO_BUILD= yes
USE_JAVA= yes
JAVA_VERSION= 1.4+
USE_REINPLACE= yes
SUB_FILES= hattrickorganizer.sh
SUB_FILES= hattrickorganizer.sh
do-install:
cd ${WRKSRC} && ${FIND} . -type d -exec ${MKDIR} ${DATADIR}/{} \;
cd ${WRKSRC} && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
${INSTALL_SCRIPT} ${WRKDIR}/hattrickorganizer.sh ${PREFIX}/bin/hattrickorganizer
${REINPLACE_CMD} -e 's|HODIR=`pwd`|HODIR=${DATADIR}|' ${WRKSRC}/HO.sh
${REINPLACE_CMD} 's|^HOHOME=.*|HOHOME=~/\.hattrickorganizer|' ${WRKSRC}/HO.sh
${INSTALL_SCRIPT} ${WRKSRC}/HO.sh ${PREFIX}/bin/hattrickorganizer
.include <bsd.port.mk>

View file

@ -1,3 +1,2 @@
MD5 (ho_136.zip) = b79026fba1fb9c596d70b23cd1119ebd
SHA256 (ho_136.zip) = a10968f0596bba1d71e6fcc3b1eb08d3cc671c202afcd3623c64a0d4db5f721a
SIZE (ho_136.zip) = 4166641
MD5 (ho_138.zip) = c50f39d307dce8b4821f11b37abd092c
SIZE (ho_138.zip) = 4224238

View file

@ -1,11 +1,13 @@
#!/bin/sh
#
# Start script for Hattrick Organizer v0.3
# Start script for Hattrick Organizer v0.31
# Originally created by patta, RAGtime and others
# Last Change (2005-08-07) by Lars Engels (lars@bsd-geek.de)
#
# List of changes:
#
# 0.31 - configurable java memory (-m or $MAX_MEMORY)
#
# 0.3 - Introduce the bourne shell as standard shell
# - Make HO! multi-user capable
# - Several layout changes to the script
@ -27,7 +29,7 @@
# - edit the HODIR variable to this new directory (without the ``) #
# and HOHOME to any user writable directory! #
# #
# - start HO! out of a terminal via e.g. 'hattrickorganizer' #
# - start HO! out of a terminal via e.g. 'ho' #
# #
# - manage your team :) #
# #
@ -42,7 +44,7 @@
#
#HODIR=`pwd`
HODIR="%%DATADIR%%"
HODIR=`pwd`
# Next comes HO!'s directory to store its user data.
# This directory must be writable by the user,
@ -56,14 +58,14 @@ HODIR="%%DATADIR%%"
#
#HOHOME=~/.hattrickorganizer
HOHOME=~/.hattrickorganizer
HOHOME=$HODIR
# Where can I find java?
# Default is just looking at $PATH
# (remember option -j)
#JAVA=`which java`
JAVA="%%LOCALBASE%%/bin/java"
JAVA=`which java`
# Enter the maximum amount of backups you do want to store.
# Default is 5
@ -72,6 +74,13 @@ JAVA="%%LOCALBASE%%/bin/java"
MAX_BACKUPS=5
# Enter the maximum amount of memory available to the java VM.
# Default is 256 MegaBytes!
#
#MAX_MEMORY=256m
MAX_MEMORY=256m
########################################################################
# DO NOT EDIT ANY MORE UNTIL YOU KNOW WHAT YOU'RE DOING! #
########################################################################
@ -113,8 +122,6 @@ JAVAVERREQ=1.4.1
# Which database files and name of backup file?
# Which database files and name of backup file?
BACKUPLIST="database.data database.script database.backup database.properties"
PREFIX=database
@ -126,9 +133,10 @@ DATE=`date "+%Y-%m-%d"`
CHECK=true
# Perform backup by default?
# Perform NO backup by default (because HO does this now internally!
# For old behavoir edit or start with option --backup/-b)
BACKUP=true
BACKUP=false
# Restore by default?
# IMPORTANT! This is just for initialisation!
@ -155,15 +163,17 @@ help(){
Usage: $HONAME [option]
Options:
-h --help This help text
-v --version Show HO! version
-f --force Start without checking java-version
-nb --nobackup Start without backup
-j --java <path> Use this java
-r --restore Restore the last backup-file
-rd --restoredate <date>
Restore the backup-file from <date>
-bd --backupdir Use this as the backup directory
-h --help This help text
-v --version Show HO! version
-f --force Start without checking java-version
-j --java <path> Use this java
-m --memory <mem> Max. size of memory allocation pool for java
-b --backup Do a database backup before HO starts
-nb --nobackup Start without backup (by script)
-r --restore Restore the last backup-file
-rd --restoredate <date>
Restore the backup-file from <date>
-bd --backupdir Use this as the backup directory
EOF
exit 1
}
@ -171,22 +181,24 @@ help(){
# Start HO!
start(){
echo "Starting HO from $HOHOME..."
cd $HOHOME
JAVA_VERSION="%%JAVA_VERSION%%" "${JAVA}" -jar $HODIR/hocoded.jar
echo "Starting HO from $HOHOME..."
$JAVA -classpath $HODIR HOLauncher
$JAVA -Xmx$MAX_MEMORY -jar $HODIR/hocoded.jar
# check database and print warning
if [ `grep modified $DATABASEDIR/database.properties | \
# check database and print warning
if [ `grep modified $DATABASEDIR/database.properties | \
cut -d= -f2` = "no" ]
then
then
echo "Database OK!"
else
else
cat <<-EOF >&2
Database was not relased correctly!
Probably next time you will have problems starting HO...
... but you can restore a backup with switches -r or -rd. :-)
EOF
fi
fi
}
# Backup
@ -286,7 +298,7 @@ checkjava(){
### MAIN
# Run throuh the params
# Run through the params
until [ -z "$1" ]
do
@ -300,6 +312,15 @@ do
fi
shift
;;
-m|--memory)
MAX_MEMORY=$2;
if [ -z $MAX_MEMORY ]
then
echo "Option m or memory needs a parameter!" >&2
exit 1
fi
shift
;;
-v|--version)
echo "This is HO! version $HOVERSION";
exit 0
@ -307,6 +328,9 @@ do
-nb|--nobackup)
BACKUP=false
;;
-b|--backup)
BACKUP=true
;;
-f|--force)
CHECK=false
;;
@ -378,6 +402,18 @@ then
cp -r $HODIR/sprache $HOHOME
fi
# copy needed parameter files if not already there
if [ ! -e $HOHOME/ratings.dat ]
then
cp $HODIR/ratings.dat $HOHOME/ratings.dat
fi
if [ ! -e $HOHOME/epv.dat ]
then
cp $HODIR/epv.dat $HOHOME/epv.dat
fi
# Perform backups or restore only if $DATABASEDIR exists
if [ -d $DATABASEDIR ]
@ -385,11 +421,10 @@ then
`$BACKUP` && backup
`$RESTORE` && restore
else
echo -e "No directory $DATABASEDIR found. \n
This is your first HO!-Session, isn't it? Have fun!"
echo -e "No directory $DATABASEDIR found. \n This is your first HO!-Session, isn't it? Have fun!"
fi
# Start HO!
# Start HO! (or the Launcher)
start

View file

@ -190,6 +190,8 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/commons/ui/info/clearthought/layout/TableLayout.class
%%DATADIR%%/hoplugins/commons/ui/info/clearthought/layout/TableLayoutConstants.class
%%DATADIR%%/hoplugins/commons/ui/info/clearthought/layout/TableLayoutConstraints.class
%%DATADIR%%/hoplugins/commons/ui/renderer/HtmlCellRenderer.class
%%DATADIR%%/hoplugins/commons/ui/renderer/TextAreaCellRenderer.class
%%DATADIR%%/hoplugins/commons/ui/sorter/AbstractTableSorter$1.class
%%DATADIR%%/hoplugins/commons/ui/sorter/AbstractTableSorter$2.class
%%DATADIR%%/hoplugins/commons/ui/sorter/AbstractTableSorter.class
@ -362,6 +364,8 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingRecapPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingRecapTable.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingTable.class
%%DATADIR%%/hoplugins/trainingExperience/ui/bar/ColorBar$1.class
%%DATADIR%%/hoplugins/trainingExperience/ui/bar/ColorBar.class
%%DATADIR%%/hoplugins/trainingExperience/ui/bar/ColorModus.class
%%DATADIR%%/hoplugins/trainingExperience/ui/bar/StateBar.class
%%DATADIR%%/hoplugins/trainingExperience/ui/bar/VerticalIndicator.class
@ -506,6 +510,7 @@ bin/hattrickorganizer
@dirrm %%DATADIR%%/hoplugins/commons/vo
@dirrm %%DATADIR%%/hoplugins/commons/utils
@dirrm %%DATADIR%%/hoplugins/commons/ui/sorter
@dirrm %%DATADIR%%/hoplugins/commons/ui/renderer
@dirrm %%DATADIR%%/hoplugins/commons/ui/info/clearthought/layout
@dirrm %%DATADIR%%/hoplugins/commons/ui/info/clearthought
@dirrm %%DATADIR%%/hoplugins/commons/ui/info