summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorM.Reynolds2019-12-14 17:16:22 -0500
committerM.Reynolds2019-12-14 17:16:22 -0500
commitc320590a74373b3ac04d59b5c780534e6b74a81c (patch)
tree45d84db069ac85030cf5832138c827dda0ca241a /PKGBUILD
parent40b7e401fae0005aa8000676d22b539077360716 (diff)
downloadaur-c320590a74373b3ac04d59b5c780534e6b74a81c.tar.gz
Remove bundled Java and cleanup package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD60
1 files changed, 34 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4b4f78e8bd63..71c90c980eab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,46 +2,54 @@
pkgname=tastyworks
pkgver=1.0.16
-pkgrel=1
+pkgrel=4
pkgdesc="One of the fastest, most reliable, and most secure trading platforms in the world."
arch=('x86_64')
url="https://tastyworks.com/technology.html"
license=('Other')
depends=('java-runtime')
-source=("https://download.tastyworks.com/desktop-1.x.x/$pkgver/$pkgname-$pkgver-$pkgrel.x86_64.rpm"
+source=("https://download.tastyworks.com/desktop-1.x.x/$pkgver/$pkgname-$pkgver-1.x86_64.rpm"
"tastyworks.png")
sha256sums=('8a2c9bd54dd1736aa07e693839939988d94951537709cf1bd3e9263ce3368fd5'
'5875675195bb9156c050976e00c98538a6662740f5359e677d26fe5e21560cea')
-package() {
-
- cd "$srcdir"
-
- find "$srcdir" -name "*.jar" -type f -exec chmod 755 {} \;
- find "$srcdir" -name "*.so" -type f -exec chmod 755 {} \;
+prepare() {
+ # Set correct permissions on executable files and libraries
+ find "$srcdir" -name "*.jar" -type f -exec chmod 755 {} \;
+ find "$srcdir" -name "*.so" -type f -exec chmod 755 {} \;
- mkdir -p usr/bin
+ # Set correct information for the application .desktop launcher
+ sed -i 's|Name=tastyworks|Name=TastyWorks|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
+ sed -i 's|Comment=tastyworks|Comment=Trading Platform|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
+ sed -i 's|Exec=/opt/tastyworks/bin/tastyworks|Exec=/usr/bin/tastyworks|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
+ sed -i 's|Icon=/opt/tastyworks/bin/tastyworks.png|Icon=tastyworks|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
+ sed -i 's|Categories=tastyworks|Categories=Network|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
- pushd "usr/bin" && ln -sf /opt/$pkgname/bin/$pkgname && popd
+ # Add the correct startup window manager class
+ # This *should* fix gnome from creating more than one dock entry for the program
+ echo 'StartupWMClass=tasty.javafx.launcher.LauncherFxApp' >> "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
+ sed -i '/^[[:space:]]*$/d' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
- install -d "$pkgdir/opt/$pkgname"
- cp -r "$srcdir/opt/$pkgname/" "$pkgdir/opt/"
- cp -r "$srcdir/usr/" "$pkgdir/"
+ # Remove additional bundled Java "runtime"
+ sed -i 's|app.runtime=$APPDIR/runtime|app.runtime=/usr/lib/jvm/default-runtime|' "$srcdir/opt/$pkgname/app/tastyworks.cfg"
+}
- sed -i 's|Name=tastyworks|Name=TastyWorks|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
- sed -i 's|Comment=tastyworks|Comment=Trading Platform|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
- sed -i 's|Icon=/opt/tastyworks/tastyworks.png|Icon=tastyworks|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
- sed -i 's|Categories=Unknown|Categories=Internet|' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
+package() {
+ # Install program executable
+ install -d "$pkgdir/usr/bin"
+ install -Dm 755 "$srcdir/opt/$pkgname/bin/$pkgname" "$pkgdir/usr/lib/$pkgname/bin/$pkgname"
+ ln -s "/usr/lib/$pkgname/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
- # Add the correct startup window manager class
- # This *should* fix gnome from creating more than one dock entry for the program
- echo 'StartupWMClass=tasty.javafx.launcher.LauncherFxApp' >> "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
- sed -i '/^[[:space:]]*$/d' "$srcdir/opt/$pkgname/bin/$pkgname.desktop"
+ # Install additional program library
+ install -Dm 755 "$srcdir/opt/$pkgname/bin/libapplauncher.so" "$pkgdir/usr/lib/$pkgname/bin/libapplauncher.so"
- install -Dm 644 "$srcdir/opt/$pkgname/bin/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
+ # Install application launcher
+ install -Dm 644 "$srcdir/opt/$pkgname/bin/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
- # Alternative Application Icon
- install -Dm 644 "$srcdir/opt/$pkgname/bin/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
- # install -Dm 644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
+ # Install application icon
+ install -Dm 644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
-}
+ # Install necessary Java program jars
+ install -d "$pkgname/usr/lib/$pkgname/app"
+ cp -r "$srcdir/opt/$pkgname/app/" "$pkgdir/usr/lib/$pkgname/app/"
+} \ No newline at end of file