diff options
-rw-r--r-- | PKGBUILD | 15 | ||||
-rwxr-xr-x | ib-gw | 8 | ||||
-rw-r--r-- | ib-gw.conf | 14 | ||||
-rwxr-xr-x | ib-tws | 9 | ||||
-rw-r--r-- | ib-tws.conf | 15 |
5 files changed, 52 insertions, 9 deletions
@@ -1,30 +1,35 @@ # Maintainer: Ben Alex <ben.alex@acegi.com.au> +# Contributor: Jon Wiersma <archaur@jonw.org> pkgname=ib-tws pkgver=971.1 -pkgrel=1 +pkgrel=2 pkgdesc='Electronic trading platform from discount brokerage firm Interactive Brokers' arch=('any') url="http://interactivebrokers.com/" license=('custom') +backup=('etc/ib-tws.conf' 'etc/ib-gw.conf') depends=(bash) optdepends=(ffmpeg2.8) makedepends=(gtk2 imagemagick unzip) source=('LICENSE' 'ib-tws' + 'ib-tws.conf' 'ib-tws.desktop' 'ib-gw' + 'ib-gw.conf' 'ib-gw.desktop' 'https://download2.interactivebrokers.com/installers/tws/latest-standalone/tws-latest-standalone-linux-x64.sh') md5sums=('e1cae2de592add7133bb08123e8db1ad' - 'dff283b103c0ddeb76eba6ecfb852afd' + '428c553da90bb2ea650a7f96ae076937' + '1ec45ec225b8dcd362634f7395e8cd0d' '9205b5eade96d69f8e470cc52c30db4a' - '6f08b240afad921b29c2c81a440a6a8a' + 'b1cbe7273f3d0f2f0b6a09e65606b600' + '238637fb4ab6ae734bade474709bafb1' 'ffa9fcfb623850e5c9e796040bdbd052' 'ae2df5f73a2f519a417708ad97c33517') - build() { cd ${srcdir} chmod +x tws-latest-standalone-linux-x64.sh @@ -59,6 +64,8 @@ package() { install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE install -Dm755 ${pkgname} ${pkgdir}/usr/bin/${pkgname} install -Dm755 ib-gw ${pkgdir}/usr/bin/ib-gw + install -Dm644 ${pkgname}.conf ${pkgdir}/etc/$pkgname.conf + install -Dm644 ib-gw.conf ${pkgdir}/etc/ib-gw.conf install -Dm644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop install -Dm644 ib-gw.desktop ${pkgdir}/usr/share/applications/ib-gw.desktop mkdir -p ${pkgdir}/usr/share/pixmaps/ @@ -1,4 +1,8 @@ #!/bin/bash -cd /usr/share/ib-tws/jars -/usr/share/ib-tws/jre/bin/java -cp \* -Xmx512M -Dsun.java2d.noddraw=true ibgateway.GWClient $HOME/.ib-tws +# Load system-wide settings and per-user overrides +. /etc/ib-gw.conf +[[ -f $HOME/.config/ib-gw.conf ]] && . $HOME/.config/ib-gw.conf + +cd /usr/share/ib-tws/jars +/usr/share/ib-tws/jre/bin/java -cp \* $JAVA_FLAGS ibgateway.GWClient $IB_CONFIG_DIR diff --git a/ib-gw.conf b/ib-gw.conf new file mode 100644 index 000000000000..b4b583682524 --- /dev/null +++ b/ib-gw.conf @@ -0,0 +1,14 @@ +# System-wide config. To change these values per-user create a file at: +# $HOME/.config/ib-gw.conf and set only the values you want to change there. +# +# In a per-user file you can also append to these flags like this: +# ex: JAVA_UI_FLAGS="$JAVA_UI_FLAGS -Dsome_extra_flag" +# +# Or to the full set of JAVA_FLAGS like this: +# ex: JAVA_FLAGS="$JAVA_FLAGS -SomeOtherFlag" + +IB_CONFIG_DIR=$HOME/.ib-tws +JAVA_XMX="-Xmx512m" +JAVA_UI_FLAGS="-Dsun.java2d.noddraw=true" +JAVA_EXTRA_FLAGS= +JAVA_FLAGS="$JAVA_XMX $JAVA_UI_FLAGS $JAVA_EXTRA_FLAGS" @@ -1,5 +1,8 @@ #!/bin/bash + +# Load system-wide settings and per-user overrides +. /etc/ib-tws.conf +[[ -f $HOME/.config/ib-tws.conf ]] && . $HOME/.config/ib-tws.conf + cd /usr/share/ib-tws/jars -/usr/share/ib-tws/jre/bin/java -cp \* \ - -Xmx768m -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true \ - jclient.LoginFrame $HOME/.ib-tws +/usr/share/ib-tws/jre/bin/java -cp \* $JAVA_FLAGS jclient.LoginFrame $IB_CONFIG_DIR diff --git a/ib-tws.conf b/ib-tws.conf new file mode 100644 index 000000000000..eb8152edd7f1 --- /dev/null +++ b/ib-tws.conf @@ -0,0 +1,15 @@ +# System-wide config. To change these values per-user create a file at: +# $HOME/.config/ib-tws.conf and set only the values you want to change there. +# +# In a per-user file you can also append to these flags like this: +# ex: JAVA_UI_FLAGS="$JAVA_UI_FLAGS -Dsome_extra_flag" +# +# Or to the full set of JAVA_FLAGS like this: +# ex: JAVA_FLAGS="$JAVA_FLAGS -SomeOtherFlag" + +IB_CONFIG_DIR=$HOME/.ib-tws +JAVA_XMX="-Xmx768m" +JAVA_UI_FLAGS="-Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false" +JAVA_LOCALE_FLAGS="-Dsun.locale.formatasdefault=true" +JAVA_EXTRA_FLAGS= +JAVA_FLAGS="$JAVA_XMX $JAVA_UI_FLAGS $JAVA_LOCALE_FLAGS $JAVA_EXTRA_FLAGS" |