diff --git a/BioArchLinux/mesquite/PKGBUILD b/BioArchLinux/mesquite/PKGBUILD index fd22b1cd45..74ec553816 100644 --- a/BioArchLinux/mesquite/PKGBUILD +++ b/BioArchLinux/mesquite/PKGBUILD @@ -3,38 +3,79 @@ # Contributor: Anton Bazhenov # Contributor: Mick Elliot -pkgname=mesquite -pkgver=3\.81_build955 +pkgbase=mesquite +pkgname=('mesquite' 'mesquite-extra' 'mesquite-doc') +pkgver=3.81_build955 pkgrel=1 -pkgdesc="A modular, extendible software for evolutionary biology, designed to help biologists organize and analyze comparative data about organisms" arch=('any') url="http://mesquiteproject.org" license=('LGPL') -depends=('java-runtime=8') -source=($pkgname-${pkgver: 0: 4}::https://github.com/MesquiteProject/MesquiteCore/releases/download/v${pkgver//_/-}/Mesquite_${pkgver: 0: 4}_Linux.tgz - $pkgname.png - $pkgname.desktop - $pkgname.sh +makedepends=('java-environment=8' 'maven' 'git' 'libicns' 'gendesk') +source=($pkgbase::git+https://github.com/MesquiteProject/MesquiteCore.git#tag=v${pkgver//_/-} + $pkgbase.patch::https://github.com/MesquiteProject/MesquiteCore/pull/108.patch ) -md5sums=('560700a0968ea4be1eb96df3674f876d' - '8b62ba93f95aab14a8643bf5b939f465' - '5107a3118443aca1eac69db381d7df50' - 'f6ff62edbf95e40d21c7bceadb35ecfe') +md5sums=('SKIP' + '530fb128307845f75633ee897715b2c3') +prepare() { + cd $srcdir/$pkgbase + patch -p1 < $srcdir/$pkgbase.patch +} -package() { - cd $srcdir/Mesquite_Folder +build() { + cd $srcdir/$pkgbase + + # compile pkg + mvn package + + # generate desktop + gendesk --pkgname "$pkgbase" --pkgdesc "A modular, extendible software for evolutionary biology, designed to help biologists organize and analyze comparative data about organisms" --exec="$pkgbase" --icon="$pkgbase" + + # generate binary + echo "java -jar /usr/share/$pkgbase/Mesquite.jar" >> $pkgbase + chmod +x $pkgbase + + cd target/classes + rm -rf *.exe Mesquite_Start* starting* Running* examples +} + +package_mesquite() { + depends=('java-runtime=8' 'sh' 'python') + pkgdesc="A modular, extendible software for evolutionary biology, designed to help biologists organize and analyze comparative data about organisms" + optdepends=('mesquite-doc: doc for mesquite' + 'mesquite-extra: extra data for mesquite') + cd $srcdir/$pkgname + cd target/classes - # Remove bundled shell script and install own - rm -rf $pkgdir/$pkgname.sh - install -Dm755 ../$pkgname.sh $pkgdir/usr/bin/$pkgname - # Install program files mkdir -p $pkgdir/usr/share/$pkgname cp -r * $pkgdir/usr/share/$pkgname find $pkgdir/usr/share/$pkgname -type f -exec chmod 644 '{}' \; + # Install icons + cd $srcdir/$pkgname/Executables/"MacOS via Automator and Script" + icns2png -x Mesquite.icns + install -Dm 644 Mesquite_128x128x32.png $pkgdir/usr/share/pixmaps/$pkgname.png + + # install binary + install -Dm755 $srcdir/$pkgbase/$pkgbase $pkgdir/usr/bin/$pkgbase # Install a desktop entry - install -Dm644 ../$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png - install -Dm644 ../$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop + install -Dm755 ${srcdir}/$pkgbase/$pkgbase.desktop $pkgdir/usr/share/applications/$pkgname.desktop +} + +package_mesquite-doc(){ + pkgdesc="doc for mesquite" + cd $srcdir/$pkgbase + mkdir -p $pkgdir/usr/share/doc/$pkgbase/ + mv docs/* $pkgdir/usr/share/doc/$pkgbase/ + mkdir -p $pkgdir/usr/share/$pkgbase/ + ln -s /usr/share/doc/$pkgbase $pkgdir/usr/share/$pkgbase/docs +} + +package_mesquite-extra(){ + pkgdesc="extra data for mesquite" + cd $srcdir/$pkgbase + mkdir -p $pkgdir/usr/share/$pkgbase/ + cd Resources + mv examples $pkgdir/usr/share/$pkgbase/ } diff --git a/BioArchLinux/mesquite/mesquite.desktop b/BioArchLinux/mesquite/mesquite.desktop deleted file mode 100644 index 4ae7017801..0000000000 --- a/BioArchLinux/mesquite/mesquite.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -Version=1.0 -Name=Mesquite -Comment=A modular, extendible software for evolutionary biology, designed to help biologists organize and analyze comparative data about organisms. -Exec=mesquite %U -Icon=mesquite -Terminal=false -Categories=Java;Education;Science;Biology; diff --git a/BioArchLinux/mesquite/mesquite.png b/BioArchLinux/mesquite/mesquite.png deleted file mode 100644 index 620884c21a..0000000000 Binary files a/BioArchLinux/mesquite/mesquite.png and /dev/null differ diff --git a/BioArchLinux/mesquite/mesquite.sh b/BioArchLinux/mesquite/mesquite.sh deleted file mode 100644 index cdf631a38d..0000000000 --- a/BioArchLinux/mesquite/mesquite.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -java=/usr/bin/java -dir=/usr/share/mesquite - -cp -r "$dir/../Resources/com/"* "$dir/com/" >& /dev/null -$java -Djava.library.path=lib -Djri.ignore.ule="yes" -cp "$dir" mesquite.Mesquite $* - -