diff options
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | PKGBUILD | 73 |
2 files changed, 64 insertions, 45 deletions
@@ -1,16 +1,34 @@ pkgbase = ib-tws - pkgdesc = Electronic trading platform from discount brokerage firm Interactive Brokers - pkgver = 10.16.1j + pkgdesc = Electronic trading platform from discount brokerage firm Interactive Brokers (IBKR) + pkgver = 10.29.1g pkgrel = 1 epoch = 1 url = http://interactivebrokers.com/ - arch = any + arch = x86_64 license = custom - makedepends = gtk2 - makedepends = imagemagick - makedepends = unzip + makedepends = libarchive + makedepends = findutils + makedepends = sed + depends = alsa-lib + depends = at-spi2-core depends = bash - optdepends = ffmpeg-compat-55 + depends = cairo + depends = fontconfig + depends = freetype2 + depends = gcc-libs + depends = gdk-pixbuf2 + depends = glib2 + depends = glibc + depends = gtk3 + depends = libgl + depends = libx11 + depends = libxext + depends = libxi + depends = libxrender + depends = libxtst + depends = libxxf86vm + depends = pango + optdepends = ffmpeg3.4 backup = etc/ib-tws.conf backup = etc/ib-gw.conf source = LICENSE @@ -20,7 +38,7 @@ pkgbase = ib-tws source = ib-gw source = ib-gw.conf source = ib-gw.desktop - source = tws-10.16.1j-standalone-linux-x64.sh::https://download2.interactivebrokers.com/installers/tws/latest-standalone/tws-latest-standalone-linux-x64.sh + source = tws-10.29.1g-standalone-linux-x64.sh::https://download2.interactivebrokers.com/installers/tws/latest-standalone/tws-latest-standalone-linux-x64.sh sha256sums = 4b65b33dc88d77fef6e7ba1bdc1ae88b149296d3e1eb87db251bfcdf119a1f22 sha256sums = e23256d8948a2a1adf7d69d99909738888b7d8a0adbd81578543312f1f509f66 sha256sums = b359c8b5ccc7d884316ba9c88395450ff3a5dfd6af376741f091f837a5db7c26 @@ -28,6 +46,6 @@ pkgbase = ib-tws sha256sums = 62fbd49b8c7fb5d4ae7491ca2b9072d42bbe589a2b9f0e14d09d1bf1177a3c46 sha256sums = 21070fa89c9053dff06ba799b6f9838bfd5ff209fd8dd710c5a97c3fc684af44 sha256sums = 9f74a204c45d47f551861cb231de89f2536f9966942da41f95d8f0ce5bcd13a4 - sha256sums = 9eca038056bd86861f2b4dc85866396c758853f9ec344bd7c37fdb6bd2ea4f1b + sha256sums = 81a5f8e4d4facd53786aad98658e3f94cbbda7690aad6a87c076fff961f70353 pkgname = ib-tws @@ -1,18 +1,19 @@ # Maintainer: Ben Alex <ben.alex@acegi.com.au> # Contributor: Jon Wiersma <archaur@jonw.org> +# Contributor: bgh <aur at bgh dot io> pkgname=ib-tws -pkgver=10.16.1j +pkgver=10.29.1g pkgrel=1 epoch=1 -pkgdesc='Electronic trading platform from discount brokerage firm Interactive Brokers' -arch=('any') +pkgdesc='Electronic trading platform from discount brokerage firm Interactive Brokers (IBKR)' +arch=('x86_64') url="http://interactivebrokers.com/" license=('custom') backup=('etc/ib-tws.conf' 'etc/ib-gw.conf') -depends=(bash) -optdepends=(ffmpeg-compat-55) -makedepends=(gtk2 imagemagick unzip) +depends=(alsa-lib at-spi2-core bash cairo fontconfig freetype2 gcc-libs gdk-pixbuf2 glib2 glibc gtk3 libgl libx11 libxext libxi libxrender libxtst libxxf86vm pango) +optdepends=(ffmpeg3.4) +makedepends=(libarchive findutils sed) source=('LICENSE' 'ib-tws' @@ -29,33 +30,39 @@ sha256sums=('4b65b33dc88d77fef6e7ba1bdc1ae88b149296d3e1eb87db251bfcdf119a1f22' '62fbd49b8c7fb5d4ae7491ca2b9072d42bbe589a2b9f0e14d09d1bf1177a3c46' '21070fa89c9053dff06ba799b6f9838bfd5ff209fd8dd710c5a97c3fc684af44' '9f74a204c45d47f551861cb231de89f2536f9966942da41f95d8f0ce5bcd13a4' - '9eca038056bd86861f2b4dc85866396c758853f9ec344bd7c37fdb6bd2ea4f1b') + '81a5f8e4d4facd53786aad98658e3f94cbbda7690aad6a87c076fff961f70353') build() { cd ${srcdir} - rm -rf ${srcdir}/target ${srcdir}/jre + rm -rf ${srcdir}/target ${srcdir}/jre ${srcdir}/*.jar mkdir ${srcdir}/target ${srcdir}/jre chmod +x tws-${pkgver}-standalone-linux-x64.sh ./tws-${pkgver}-standalone-linux-x64.sh -q -dir ${srcdir}/target - # install4j provides a "shared" JRE that may go into /opt, /usr/local or $HOME/.i4j_jres/. - # If it already exists, the install4j log will include a "java.home=" truncated path. - BUNDLED_JRE_LOCATION=$(grep java.home ${srcdir}/target/.install4j/installation.log | head -n 1 | cut -d '=' -f 2 | sed 's/\.\.\.//g') - if [ -z "${BUNDLED_JRE_LOCATION}" ]; then - echo "java.home JRE location could not be found in the log" - exit 1 - fi - BUNDLED_JRE_LOCATION=$(echo ${BUNDLED_JRE_LOCATION}*) - echo "java.home JRE location expanded to ${BUNDLED_JRE_LOCATION}" - - if [ ! -f "${BUNDLED_JRE_LOCATION}/bin/java" ]; then - echo "java.home JRE location did not contain java; finding log entry which installed java" - BUNDLED_JRE_LOCATION=$(grep -e "Install file.*\/java\;" ${srcdir}/target/.install4j/installation.log | head -n 1 | cut -d ';' -f 1|sed -e 's/ .*Install file\: //g'|sed 's/\/bin\/java//') + echo "Attempting to locate the Install4J-compatible Java installation" + if grep -q -e "Install file.*/java;" ${srcdir}/target/.install4j/installation.log; then + echo "Installer script indicates Java was installed by Install4j; finding log entry for full path" + BUNDLED_JRE_LOCATION=$(grep -e "Install file.*/java;" ${srcdir}/target/.install4j/installation.log | head -n 1 | cut -d ';' -f 1|sed -e 's/ .*Install file\: //g'|sed 's/\/bin\/java//') if [ -z "${BUNDLED_JRE_LOCATION}" ]; then - echo "Could not find bundled JRE installation entry in log" + echo "Could not find bundled JRE installation entry in Install4J log; unable to proceed" + exit 1 + fi + echo "Java installed by Install4J at ${BUNDLED_JRE_LOCATION}" + else + echo "Install4J log did not install Java; attempting to locate a previous Java installation it re-used" + LOG_JRE_LOCATION=$(grep java.home ${srcdir}/target/.install4j/installation.log | head -n 1 | cut -d '=' -f 2 | sed 's/\.\.\.//g') + if [ -z "${LOG_JRE_LOCATION}" ]; then + echo "Install4J log did not provide a java.home; unable to proceed" exit 1 fi + echo "Previous Install4J-installed Java reported in log as ${LOG_JRE_LOCATION}" + CANONICALIZED_JRE_LOCATION=$(echo ${LOG_JRE_LOCATION}*) + echo "Canonicalized path resolved to ${CANONICALIZED_JRE_LOCATION}" + FIND_OUTPUT=$(find ${CANONICALIZED_JRE_LOCATION} -path '*/bin/java' | head -n 1) + echo "Search for Java result: $FIND_OUTPUT" + BUNDLED_JRE_LOCATION=$(echo ${FIND_OUTPUT} | sed 's/\(.*\)\/bin\/java/\1/') + echo "Final Java installation directory resolved to ${BUNDLED_JRE_LOCATION}" fi if [ -f "${BUNDLED_JRE_LOCATION}/bin/java" ]; then echo "Confirmed java in ${BUNDLED_JRE_LOCATION}" @@ -67,19 +74,13 @@ build() { # copy the bundled JRE (do not move it as other install4j applications may be sharing it) cp -r "${BUNDLED_JRE_LOCATION}"/* ${srcdir}/jre mv ${srcdir}/target/jars/*.jar ${srcdir} - rm -f "${HOME}"/Desktop/Trader\ Workstation*.desktop + rm -f "${HOME}"/Desktop/Trader\ Workstation*.desktop "${HOME}"/.local/share/applications/install4j_*-tws.desktop - # Thanks to http://finance.groups.yahoo.com/group/TWSAPI/files/RPM%20spec%20file/ - unzip -o jts4launch-*.jar trader/common/images/ibapp_icon_48x48.gif - unzip -o jts4launch-*.jar trader/common/images/quote_details_48x48.jpg - convert trader/common/images/ibapp_icon_48x48.gif ${pkgname}.png - convert trader/common/images/ibapp_icon_48x48.gif -resize 66.666% ${pkgname}-32x32.png - convert trader/common/images/ibapp_icon_48x48.gif -resize 33.333% ${pkgname}-16x16.png - convert trader/common/images/ibapp_icon_48x48.gif ${pkgname}-48x48.png - convert trader/common/images/quote_details_48x48.jpg ib-gw.png - convert trader/common/images/quote_details_48x48.jpg -resize 66.666% ib-gw-32x32.png - convert trader/common/images/quote_details_48x48.jpg -resize 33.333% ib-gw-16x16.png - convert trader/common/images/quote_details_48x48.jpg ib-gw-48x48.png + # icons + bsdtar --extract --include trader/common/images/ibkr_icon_w12.32_h24.svg --strip-components=3 \ + --to-stdout --file jts4launch-*.jar | tee ib-tws.svg ib-gw.svg + sed --in-place --expression='s/{fill: #911421;}/{fill: #0d0d0d;}/' \ + --expression='s/{fill: #d81222;}/{fill: #161616;}/' ib-gw.svg # recolor gw icon to differentiate } package() { @@ -92,8 +93,8 @@ package() { 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/ - install -Dm644 *.png "${pkgdir}/usr/share/pixmaps/" + mkdir -p ${pkgdir}/usr/share/icons/ + install -Dm644 ib-*.svg "${pkgdir}/usr/share/icons/" mkdir -p ${pkgdir}/usr/share/${pkgname}/jre cp -R jre ${pkgdir}/usr/share/${pkgname} mkdir -p ${pkgdir}/usr/share/${pkgname}/jars |