diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2006-01-29 05:10:40 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2006-01-29 05:10:40 +0000 |
commit | ac1c0d563557f0357a4d548bb5623d22024d45de (patch) | |
tree | f97d91f6914ad0defec144be9de1280f7c277e55 /games/hattrickorganizer | |
parent | 426af3f595565e2488775f690cd2375b7c52fbba (diff) | |
download | ports-ac1c0d563557f0357a4d548bb5623d22024d45de.tar.gz ports-ac1c0d563557f0357a4d548bb5623d22024d45de.zip |
Update to 1.38.
PR: ports/91978
Submitted by: Lars Engels <lars dot engels at 0x20 dot net> (maintainer)
Notes
Notes:
svn path=/head/; revision=154704
Diffstat (limited to 'games/hattrickorganizer')
-rw-r--r-- | games/hattrickorganizer/Makefile | 17 | ||||
-rw-r--r-- | games/hattrickorganizer/distinfo | 5 | ||||
-rw-r--r-- | games/hattrickorganizer/files/hattrickorganizer.sh.in | 93 | ||||
-rw-r--r-- | games/hattrickorganizer/pkg-plist | 5 |
4 files changed, 81 insertions, 39 deletions
diff --git a/games/hattrickorganizer/Makefile b/games/hattrickorganizer/Makefile index ac3e554fe403..7245e4e28df2 100644 --- a/games/hattrickorganizer/Makefile +++ b/games/hattrickorganizer/Makefile @@ -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> diff --git a/games/hattrickorganizer/distinfo b/games/hattrickorganizer/distinfo index d37468c4e7a6..ca2db5899c6b 100644 --- a/games/hattrickorganizer/distinfo +++ b/games/hattrickorganizer/distinfo @@ -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 diff --git a/games/hattrickorganizer/files/hattrickorganizer.sh.in b/games/hattrickorganizer/files/hattrickorganizer.sh.in index 999d89ea26f4..7a04454f65b1 100644 --- a/games/hattrickorganizer/files/hattrickorganizer.sh.in +++ b/games/hattrickorganizer/files/hattrickorganizer.sh.in @@ -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 diff --git a/games/hattrickorganizer/pkg-plist b/games/hattrickorganizer/pkg-plist index c89897365fa1..ee6f53ecbf4a 100644 --- a/games/hattrickorganizer/pkg-plist +++ b/games/hattrickorganizer/pkg-plist @@ -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 |