beast2: almost done

This commit is contained in:
sukanka 2022-11-02 00:07:14 +08:00
parent 513c1fdc0e
commit 16e4c356a4
10 changed files with 105 additions and 88 deletions

View file

@ -1,5 +1,6 @@
# Maintainer: Malacology <guoyizhang at malacology dot com>
# Contributor: Malacology <guoyizhang at malacology dot com>
# Contributor: sukanka <su975853527 at gmail dot com>
pkgname=beast2
pkgver=2.7.2
@ -14,7 +15,7 @@ source=("${pkgname}-${pkgver}.tar.gz::https://github.com/CompEvol/beast2/archive
"loganalyser.desktop" "${pkgname}-applauncher.desktop"
# executable
"${pkgname}-beauti" "${pkgname}-densitree" "${pkgname}-logcombiner" "${pkgname}-treeannotator" "${pkgname}-beast2"
"${pkgname}-loganalyser" "${pkgname}-applauncher"
"${pkgname}-loganalyser" "${pkgname}-applauncher" "${pkgname}-packagemanager" "${pkgname}-environment"
)
sha256sums=('02f561f593adf54e512d34a9366dd9e4ed0b940cb4540d97a2b4e9b705f327a3'
'SKIP'
@ -25,19 +26,23 @@ sha256sums=('02f561f593adf54e512d34a9366dd9e4ed0b940cb4540d97a2b4e9b705f327a3'
'df7bbf1363eec2af224251e77cd0a025003cd0ac751163a3e43cbe2bf52870d1'
'e4b5398d4e5fe81b0e57b2e5d3a7b1d9621c97d1b8ce40a2d5b169bd94e89397'
'8e999cabf53742fa818504a10f326e1275e23349f73267baba9058eda6add1ec'
'e8159c2a85ce43ea0d08ff4cf10525e5089db58a8c4f2bf9bfd0e368b4ecc099'
'f5cc878029b9d0469fa1db8a37a5f7e510871cc24ae6a24ecc011b5560f3bf9d'
'67785a6b1109f46203ff5f0169ed9d3f6118d72a3163e9141e10a24b1a10914f'
'aac5216b54d037f3cff3c76fa293c6afa08ed59e3e1865804f3af84569024e1e'
'ba9b05aac753a315c7ff373823cb752b535077209f4365a12a5e50d8742970f4'
'371a6a5b7ae241f77ef008984cf2b004d4d2aac373fe7dbe54ae9165c36f2c70'
'6efc50e2cf5e099f33634e702586e075fff4b34b9fc9f1a682b1c109e0343b85')
'6b935c9cd9eb7c901c2225083b92b410144eb67637443f54ba4bc99f1cd6bed1'
'ddcbeb065e1c9a1b0f745bb9df3dd2286bf5a3770f12b545962c5da33ccc3653'
'e9c61fd9798188e2153bfda533f7fbd4ae830cc6defe17847cbddf422873d054'
'e0b1931c484773b707b924b6014ee6e13b94abc47d37ccbf7b8d8af3befe4399'
'a6931ebff2b3f0cd8b8f99446ee0f93506cfe81fe8d254bd3f22a4e074a79588'
'34a6d929e0fc4d3e8d6bc68e6932a740c5193e37c321c231396168d7f4fc3a0e'
'3f2e227d433cdfdebe348eb3233b2b65497d8056a302fc95ecb1f2dbed7e1e77'
'a11c0a012cf96807a6d385e4503d480bca11855eecaab3f205c40e85efa721e7'
'0aef5826ec5523354216bdc9fe1342ee0dc39bf6d9e65e2ea8c9caad9fb5d843')
depends=('java-runtime' 'java-openjfx')
makedepends=('ant' 'git')
optdepends=('beagle-lib')
prepare(){
cd ${srcdir}/${pkgname}-${pkgver}
sed -i "s|2.7.1|2.7.2|" version.xml
cd lib
jar xvf beagle.jar
}
build(){
cd "$srcdir/BeastFX"
@ -47,7 +52,7 @@ build(){
-Drelease_dir=release2 \
-Dbeast2="../${pkgname}-${pkgver}" \
-Dbeast2path="../${pkgname}-${pkgver}" \
-lib "/usr/lib/jvm/default-runtime/lib/" \
-lib "/usr/lib/jvm/default-runtime/lib" \
-Dcommon_dir="../${pkgname}-${pkgver}/release/common/" \
-DopenjreLnx="/usr/lib/jvm/default/"
}
@ -57,9 +62,18 @@ package() {
cd "$srcdir/BeastFX/release2/Linux/"
cp -rf beast/* "${pkgdir}/usr/share/${pkgname}"
# shipped modules
for module in {beastfx,beast,beagle}
do
install -d "${pkgdir}/usr/share/${pkgname}/lib/${module}"
done
cp -rf ${srcdir}/BeastFX/build/beastfx/* "${pkgdir}/usr/share/${pkgname}/lib/beastfx"
cp -rf ${srcdir}/${pkgname}-${pkgver}/build/beast/* "${pkgdir}/usr/share/${pkgname}/lib/beast"
cp -rf ${srcdir}/${pkgname}-${pkgver}/lib/beagle/* "${pkgdir}/usr/share/${pkgname}/lib/beagle"
# correct excutable
rm -rf $pkgdir/usr/share/beast2/bin/*
for exe in {"beauti","densitree","logcombiner","treeannotator","beast2","loganalyser","applauncher"}
for exe in {"beauti","densitree","logcombiner","treeannotator","beast2","loganalyser","applauncher","packagemanager"}
do
install -Dm755 $srcdir/${pkgname}-${exe} -t $pkgdir/usr/share/beast2/bin/
done
@ -70,6 +84,8 @@ package() {
ln -s /usr/share/beast2/bin/$bin ${pkgdir}/usr/bin/$bin
done
install -Dm 755 ${srcdir}/*.desktop -t ${pkgdir}/usr/share/applications
# Do NOT put link this file to /usr/bin
install -Dm755 $srcdir/${pkgname}-environment -t $pkgdir/usr/share/beast2/bin/
# clear files
rm -rf $pkgdir/usr/share/beast2/jre

View file

@ -1,18 +1,18 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
# use BEAST_EXTRA_LIBS variable to load BEAGLE and other libraries from non-default locations
# this assumes that the library path contains all these libraries (or are set through LD_LIBRARY_PATH)
if [ -n "$BEAST_EXTRA_LIBS" ]; then
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$BEAST_EXTRA_LIBS" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.AppLauncherLauncher $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$BEAST_EXTRA_LIBS" -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
beast.pkgmgmt.launcher.AppLauncherLauncher $*
else
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.AppLauncherLauncher $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml,javafx.web,javafx.media \
beast.pkgmgmt.launcher.AppLauncherLauncher $*
fi

View file

@ -1,12 +1,9 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$LD_LIBRARY_PATH" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.BeastLauncher $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path=$LD_LIBRARY_PATH -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
beast.pkgmgmt.launcher.BeastLauncher $*

View file

@ -1,12 +1,9 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$BEAST_LIB" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.BeautiLauncher -capture $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path=$LD_LIBRARY_PATH -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml,javafx.web,javafx.media \
beast.pkgmgmt.launcher.BeautiLauncher -capture $*

View file

@ -1,12 +1,9 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
"$JAVA" -Xms256m -Xmx8g -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/DensiTree.jar:$BEAST/DensiTree.app/Contents/Resources/Java/DensiTree.jar" viz.DensiTree $*
"$JAVA" -Xms256m -Xmx8g -Djava.library.path="$BEAST_LIB" \
-cp "$BEAST_LIB/DensiTree.jar:$BEAST/DensiTree.app/Contents/Resources/Java/DensiTree.jar" \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
viz.DensiTree $*

View file

@ -0,0 +1,15 @@
#!/bin/sh
# General environment for beast2
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/default}
export BEAST=/usr/share/beast2
JFX="$JAVA_HOME/lib"
export JFX_LIBS="$JFX/javafx.controls.jar:$JFX/javafx.fxml.jar:$JFX/javafx.graphics.jar:$JFX/javafx.base.jar:$JFX/javafx.web.jar:$JFX/javafx.media.jar"
export BEAST_LIB="$BEAST/lib"
export DEFAULT_CP="/usr/share/beast2/lib"
export JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
export BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"

View file

@ -1,16 +1,18 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
# use BEAST_EXTRA_LIBS variable to load BEAGLE and other libraries from non-default locations
# this assumes that the library path contains all these libraries (or are set through LD_LIBRARY_PATH)
if [ -n "$BEAST_EXTRA_LIBS" ]; then
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$BEAST_EXTRA_LIBS" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.AppLauncherLauncher LogAnalyser $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$BEAST_EXTRA_LIBS" -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
beast.pkgmgmt.launcher.AppLauncherLauncher LogAnalyser $*
else
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.AppLauncherLauncher LogAnalyser $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
beast.pkgmgmt.launcher.AppLauncherLauncher LogAnalyser $*
fi

View file

@ -1,12 +1,9 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$BEAST_LIB" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.LogCombinerLauncher $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path=$LD_LIBRARY_PATH -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
beast.pkgmgmt.launcher.LogCombinerLauncher $*

View file

@ -1,11 +1,9 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
"$JAVA" -Xms256m -Xmx8g -Djava.library.path="$BEAST_LIB" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.PackageManager $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path=$LD_LIBRARY_PATH -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
beast.pkgmgmt.PackageManager $*

View file

@ -1,11 +1,9 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/default
export BEAST=/usr/share/beast2
self_path=$(realpath $0)
environment_file=$(dirname $self_path)/beast2-environment
source $environment_file
BEAST_LIB="$BEAST/lib"
JAVA="$JAVA_HOME"/bin/java
# use BEAGLE_LIB if the BEAGLE library is not in a standard location
BEAST_EXTRA_LIBS="$BEAST_EXTRA_LIBS:$BEAGLE_LIB"
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path="$BEAST_LIB" -Duser.language=en -cp "$BEAST_LIB/launcher.jar" beast.pkgmgmt.launcher.TreeAnnotatorLauncher $*
"$JAVA" -Dlauncher.wait.for.exit=true -Xms256m -Xmx8g -Djava.library.path=$LD_LIBRARY_PATH -Duser.language=en \
-cp $DEFAULT_CP:$BEAST_LIB/launcher.jar \
--module-path $JFX_LIBS --add-modules javafx.controls,javafx.fxml \
beast.pkgmgmt.launcher.TreeAnnotatorLauncher $*