1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00
PR:		90369
Submitted by:	Lars Engels <lars@0x20.net> (maintainer)
Approved by:	clement (mentor)
This commit is contained in:
Tim Bishop 2005-12-14 17:14:19 +00:00
parent 8d65d13b14
commit f0cf40555b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=151175
4 changed files with 110 additions and 30 deletions

View File

@ -6,10 +6,10 @@
#
PORTNAME= hattrickorganizer
PORTVERSION= 1.35
PORTREVISION= 1
PORTVERSION= 1.36
CATEGORIES= games java
MASTER_SITES= http://www.wow-auctions.net/ho/download/
MASTER_SITES= http://www.wow-auctions.net/ho/download/ \
http://www.bsd-geek.de/FreeBSD/distfiles/
DISTNAME= ho_${PORTVERSION:S/.//g}
MAINTAINER= lars.engels@0x20.net

View File

@ -1,2 +1,3 @@
MD5 (ho_135.zip) = 6fcab1f6225d566255689efd59a7ca1c
SIZE (ho_135.zip) = 3904639
MD5 (ho_136.zip) = b79026fba1fb9c596d70b23cd1119ebd
SHA256 (ho_136.zip) = a10968f0596bba1d71e6fcc3b1eb08d3cc671c202afcd3623c64a0d4db5f721a
SIZE (ho_136.zip) = 4166641

View File

@ -27,7 +27,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. 'ho' #
# - start HO! out of a terminal via e.g. 'hattrickorganizer' #
# #
# - manage your team :) #
# #
@ -107,6 +107,12 @@ PLUGINSDIR=$HOHOME/hoplugins
SPRACHDIR=$HOHOME/sprache
# required java version
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"
@ -151,7 +157,9 @@ help(){
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>
@ -167,18 +175,18 @@ start(){
cd $HOHOME
JAVA_VERSION="%%JAVA_VERSION%%" "${JAVA}" -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
@ -235,8 +243,7 @@ restore(){
if [ -r "$BACKUPDIR/$PREFIX-$RESTOREDATE.tgz" ]
then
gunzip -c "$BACKUPDIR/$PREFIX-$RESTOREDATE.tgz" | tar -xf -
echo "Restored database from $BACKUPDIR/ \
$PREFIX-$RESTOREDATE.tgz"
echo "Restored database from $BACKUPDIR/$PREFIX-$RESTOREDATE.tgz"
else
echo "Error reading backup file $BACKUPDIR/$PREFIX-$RESTOREDATE.tgz!" >&2
exit 2
@ -244,6 +251,39 @@ restore(){
fi
}
# Check java -version
checkjava(){
test -x "$JAVA" || { echo "Can't find java!" ; exit 1 ; }
JAVAVER=`$JAVA -version 2>&1 | head -n 1 | \
awk -F\" '{print $2}' | sed s/[^0-9\.].*//g`
JAVAMAJ=`echo $JAVAVER | awk -F. '{print $1}'`
JAVAMIN=`echo $JAVAVER | awk -F. '{print $2}'`
JAVAMINMIN=`echo $JAVAVER | awk -F. '{print $3}'`
JAVAMAJREQ=`echo $JAVAVERREQ | awk -F. '{print $1}'`
JAVAMINREQ=`echo $JAVAVERREQ | awk -F. '{print $2}'`
JAVAMINMINREQ=`echo $JAVAVERREQ | awk -F. '{print $3}'`
if ( [ $JAVAMAJ = "" ] || [ $JAVAMIN = "" ] \
|| [ $JAVAMINMIN = "" ] ) ; then
echo -e "Couldn't check java version! \n
Try '$HONAME -f' to override the version check" >&2
exit 3
fi
if ( [ $JAVAMAJ -lt $JAVAMAJREQ ] || \
( [ $JAVAMAJ -eq $JAVAMAJREQ ] && \
[ $JAVAMIN -lt $JAVAMINREQ ] ) || \
( [ $JAVAMAJ -eq $JAVAMAJREQ ] && \
[ $JAVAMIN -eq $JAVAMINREQ ] && \
[ $JAVAMINMIN -lt $JAVAMINMINREQ ] ) )
then
cat <<-EOF >&2
The default Java version is too old!
You could try another one: '$HONAME -j <path>'
EOF
exit 3
fi
}
### MAIN
# Run throuh the params
@ -251,6 +291,15 @@ restore(){
until [ -z "$1" ]
do
case "$1" in
-j|--java)
JAVA=$2;
if [ -z $JAVA ]
then
echo "Option j or java needs a parameter!" >&2
exit 1
fi
shift
;;
-v|--version)
echo "This is HO! version $HOVERSION";
exit 0
@ -299,6 +348,10 @@ do
done
# Check for java -version (if called without `force')
`$CHECK` && checkjava
# Check if all needed directories exist
if [ ! -d $HOHOME ]
@ -309,13 +362,19 @@ fi
if [ ! -d $PLUGINSDIR ]
then
echo "creating $PLUGINSDIR"
cp -r $HODIR/hoplugins $HOHOME
if [ ! -d $HODIR/hoplugins ]
then
echo "creating $HODIR/hoplugins"
mkdir $HOHOME/hoplugins
else
echo "copying $PLUGINSDIR"
cp -r $HODIR/hoplugins $HOHOME
fi
fi
if [ ! -d $SPRACHDIR ]
then
echo "creating $SPRACHDIR"
echo "copying $SPRACHDIR"
cp -r $HODIR/sprache $HOHOME
fi

View File

@ -1,8 +1,12 @@
bin/hattrickorganizer
%%DATADIR%%/HO.bat
%%DATADIR%%/HO.sh
%%DATADIR%%/HOLauncher.class
%%DATADIR%%/LICENSELGPL.txt
%%DATADIR%%/Logo.ico
%%DATADIR%%/README_JL.txt
%%DATADIR%%/defaults.xml
%%DATADIR%%/epv.dat
%%DATADIR%%/flags/100flag.png
%%DATADIR%%/flags/101flag.png
%%DATADIR%%/flags/102flag.png
@ -116,6 +120,8 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/TrainingExperience.class
%%DATADIR%%/hoplugins/Transfers.class
%%DATADIR%%/hoplugins/commons/plugin.xml
%%DATADIR%%/hoplugins/commons/sprache/LanguageCodes.properties
%%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer/Argentina.properties
%%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer/Catalan.properties
%%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer/Czech.properties
%%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer/Danish.properties
@ -130,6 +136,8 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer/Romanian.properties
%%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer/Slovak.properties
%%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer/Spanish.properties
%%DATADIR%%/hoplugins/commons/sprache/TeamPlanner/English.properties
%%DATADIR%%/hoplugins/commons/sprache/TrainingExperience/Argentina.properties
%%DATADIR%%/hoplugins/commons/sprache/TrainingExperience/Catalan.properties
%%DATADIR%%/hoplugins/commons/sprache/TrainingExperience/Deutsch.properties
%%DATADIR%%/hoplugins/commons/sprache/TrainingExperience/English.properties
@ -142,6 +150,7 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/commons/sprache/TrainingExperience/Slovak.properties
%%DATADIR%%/hoplugins/commons/sprache/TrainingExperience/Spanish.properties
%%DATADIR%%/hoplugins/commons/sprache/TrainingExperience/svenska.properties
%%DATADIR%%/hoplugins/commons/sprache/Transfers/Argentina.properties
%%DATADIR%%/hoplugins/commons/sprache/Transfers/Catalan.properties
%%DATADIR%%/hoplugins/commons/sprache/Transfers/Deutsch.properties
%%DATADIR%%/hoplugins/commons/sprache/Transfers/English.properties
@ -152,6 +161,7 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/commons/sprache/Transfers/Polish.properties
%%DATADIR%%/hoplugins/commons/sprache/Transfers/Portugues.properties
%%DATADIR%%/hoplugins/commons/sprache/Transfers/Spanish.properties
%%DATADIR%%/hoplugins/commons/sprache/shared/Argentina.properties
%%DATADIR%%/hoplugins/commons/sprache/shared/Catalan.properties
%%DATADIR%%/hoplugins/commons/sprache/shared/Czech.properties
%%DATADIR%%/hoplugins/commons/sprache/shared/Danish.properties
@ -169,6 +179,7 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/commons/sprache/shared/Svenska.properties
%%DATADIR%%/hoplugins/commons/ui/BaseTableModel.class
%%DATADIR%%/hoplugins/commons/ui/CompositeIcon.class
%%DATADIR%%/hoplugins/commons/ui/DebugWindow.class
%%DATADIR%%/hoplugins/commons/ui/DefaultTableSorter.class
%%DATADIR%%/hoplugins/commons/ui/InfoPanel.class
%%DATADIR%%/hoplugins/commons/ui/NumberTextField$DecimalFieldDocument.class
@ -189,12 +200,14 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/commons/ui/sorter/SortableHeaderRenderer.class
%%DATADIR%%/hoplugins/commons/ui/sorter/TableModelHandler.class
%%DATADIR%%/hoplugins/commons/utils/DateUtil.class
%%DATADIR%%/hoplugins/commons/utils/Debug.class
%%DATADIR%%/hoplugins/commons/utils/HTCalendar.class
%%DATADIR%%/hoplugins/commons/utils/HTCalendarFactory.class
%%DATADIR%%/hoplugins/commons/utils/ListUtil.class
%%DATADIR%%/hoplugins/commons/utils/MathUtil.class
%%DATADIR%%/hoplugins/commons/utils/PluginProperty.class
%%DATADIR%%/hoplugins/commons/utils/RatingUtil.class
%%DATADIR%%/hoplugins/commons/utils/SeriesUtil.class
%%DATADIR%%/hoplugins/commons/vo/MatchRating.class
%%DATADIR%%/hoplugins/teamAnalyzer/SystemManager.class
%%DATADIR%%/hoplugins/teamAnalyzer/comparator/AppearanceComparator.class
@ -239,6 +252,7 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/teamAnalyzer/ui/ManualFilterPanel$1.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/ManualFilterPanel.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/ManualFilterTableRenderer.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/PlayerInfoPanel.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/PlayerPanel.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RatingBox.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RatingPanel.class
@ -250,9 +264,6 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RecapTableSorter$3.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RecapTableSorter$4.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RecapTableSorter.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RosterPanel$1.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RosterPanel$2.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RosterPanel$3.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RosterPanel.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/RosterTableRenderer.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/TacticPanel.class
@ -274,6 +285,9 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/JokePanel.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$1.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$10.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$11.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$12.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$13.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$2.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$3.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/component/SettingPanel$4.class
@ -288,6 +302,7 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/teamAnalyzer/ui/controller/DownloadItemListener.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/controller/FavoriteItemListener.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/controller/HelpItemListener.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/controller/ImportItemListener.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/controller/SimButtonListener.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/lineup/FormationPanel.class
%%DATADIR%%/hoplugins/teamAnalyzer/ui/lineup/LineupStylePanel.class
@ -312,7 +327,7 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/teamAnalyzer/vo/Team.class
%%DATADIR%%/hoplugins/teamAnalyzer/vo/TeamLineup.class
%%DATADIR%%/hoplugins/teamAnalyzer/vo/UserTeamSpotLineup.class
%%DATADIR%%/hoplugins/trainingExperience/FutureTrainingManager.class
%%DATADIR%%/hoplugins/trainingExperience/OldTrainingManager$1.class
%%DATADIR%%/hoplugins/trainingExperience/OldTrainingManager$SkillupComperator.class
%%DATADIR%%/hoplugins/trainingExperience/OldTrainingManager.class
%%DATADIR%%/hoplugins/trainingExperience/constants/Skills.class
@ -320,36 +335,31 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/trainingExperience/dao/DividerDAO.class
%%DATADIR%%/hoplugins/trainingExperience/dao/EffectDAO$1.class
%%DATADIR%%/hoplugins/trainingExperience/dao/EffectDAO.class
%%DATADIR%%/hoplugins/trainingExperience/dao/TrainingDAO.class
%%DATADIR%%/hoplugins/trainingExperience/plugin.xml
%%DATADIR%%/hoplugins/trainingExperience/ui/AnalyzerPanel$1.class
%%DATADIR%%/hoplugins/trainingExperience/ui/AnalyzerPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/ChangeTableRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/EffectPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/MainPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputPanel$1.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputPanel$2.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputPanel$3.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputTable.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputTableRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputTableSorter$1.class
%%DATADIR%%/hoplugins/trainingExperience/ui/OutputTableSorter.class
%%DATADIR%%/hoplugins/trainingExperience/ui/PlayerDetailPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/PlayerSelectionListener.class
%%DATADIR%%/hoplugins/trainingExperience/ui/SkillupPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/SkillupTable.class
%%DATADIR%%/hoplugins/trainingExperience/ui/SkillupTableRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/StaffPanel$1.class
%%DATADIR%%/hoplugins/trainingExperience/ui/StaffPanel$2.class
%%DATADIR%%/hoplugins/trainingExperience/ui/StaffPanel$3.class
%%DATADIR%%/hoplugins/trainingExperience/ui/StaffPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingComparator.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingLegendPanel$ColorReplaceFilter.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingLegendPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingPanel$1.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingRecapPanel$1.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingRecapPanel$2.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingRecapPanel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingRecapRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingRecapTable.class
%%DATADIR%%/hoplugins/trainingExperience/ui/TrainingTable.class
%%DATADIR%%/hoplugins/trainingExperience/ui/bar/ColorModus.class
@ -366,10 +376,16 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/trainingExperience/ui/model/FutureTrainingsTableModel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/model/OutputTableModel.class
%%DATADIR%%/hoplugins/trainingExperience/ui/model/PastTrainingsTableModel.class
%%DATADIR%%/hoplugins/trainingExperience/vo/HattrickTrainingWeek.class
%%DATADIR%%/hoplugins/trainingExperience/ui/renderer/ChangeTableRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/renderer/OutputTableRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/renderer/SkillupTableRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/renderer/SkillupTypeTableCellRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/renderer/SkillupsTableCellRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/ui/renderer/TrainingRecapRenderer.class
%%DATADIR%%/hoplugins/trainingExperience/vo/FutureTrainingWeek.class
%%DATADIR%%/hoplugins/trainingExperience/vo/PastSkillup.class
%%DATADIR%%/hoplugins/trainingExperience/vo/PlayerValues.class
%%DATADIR%%/hoplugins/trainingExperience/vo/SkillChange.class
%%DATADIR%%/hoplugins/trainingExperience/vo/Skillup.class
%%DATADIR%%/hoplugins/trainingExperience/vo/TrainWeekEffect.class
%%DATADIR%%/hoplugins/transfers/constants/TransferTypes.class
%%DATADIR%%/hoplugins/transfers/dao/BookmarkDAO.class
@ -422,7 +438,9 @@ bin/hattrickorganizer
%%DATADIR%%/hoplugins/transfers/vo/TransferredPlayer.class
%%DATADIR%%/hsqldb.jar
%%DATADIR%%/hsqldb_lic.txt
%%DATADIR%%/jl1.0.jar
%%DATADIR%%/lizenz.txt
%%DATADIR%%/ratings.dat
%%DATADIR%%/sprache/Argentina.properties
%%DATADIR%%/sprache/Bulgarian.properties
%%DATADIR%%/sprache/Catalan.properties
@ -461,6 +479,7 @@ bin/hattrickorganizer
@dirrm %%DATADIR%%/hoplugins/transfers/constants
@dirrm %%DATADIR%%/hoplugins/transfers
@dirrm %%DATADIR%%/hoplugins/trainingExperience/vo
@dirrm %%DATADIR%%/hoplugins/trainingExperience/ui/renderer
@dirrm %%DATADIR%%/hoplugins/trainingExperience/ui/model
@dirrm %%DATADIR%%/hoplugins/trainingExperience/ui/component
@dirrm %%DATADIR%%/hoplugins/trainingExperience/ui/bar
@ -494,6 +513,7 @@ bin/hattrickorganizer
@dirrm %%DATADIR%%/hoplugins/commons/sprache/shared
@dirrm %%DATADIR%%/hoplugins/commons/sprache/Transfers
@dirrm %%DATADIR%%/hoplugins/commons/sprache/TrainingExperience
@dirrm %%DATADIR%%/hoplugins/commons/sprache/TeamPlanner
@dirrm %%DATADIR%%/hoplugins/commons/sprache/TeamAnalyzer
@dirrm %%DATADIR%%/hoplugins/commons/sprache
@dirrm %%DATADIR%%/hoplugins/commons