2 # Contributor: Balwinder S "bsd" Dheeman <bdheeman@gmail.com>
7 pkgdesc="Interactive Brocker's Trade Workstation"
9 url=http://www.interactivebrokers.co.in/
13 _bldname=unixmacosx.jar
14 _bldroot=http://www.interactivebrokers.com/download
16 source=('IBJts.desktop' 'IBJts.sh' 'IBJts_64x64.gif')
18 # trick re-determining the build revision and, or entertain the hidden
19 # makepkg option --forcever, huh
20 if [ -z "$FORCE_VER" ]; then
21 msg "Determining latest build revision..."
22 newpkgver=$(expr $pkgver + 1)
23 while wget -qO /dev/null http://www.interactivebrokers.co.in/en/software/releaseNotes/TWS_Notes_$newpkgver.php; do
24 newpkgver=$(expr $newpkgver + 1)
26 newpkgver=$(expr $newpkgver - 1)
27 if [ -n "$newpkgver" -a "$newpkgver" != "$pkgver" ]; then
28 msg2 "Version found: %s" "$newpkgver"
29 rm -f "$SRCDEST/${_bldname}"
30 FORCE_VER="$newpkgver"
33 elif [ "$FORCE_VER" != "$pkgver" ]; then
34 newpkgver="$FORCE_VER"
35 rm -f "$SRCDEST/${_bldname}"
40 if [ ! -r "$srcdir/${_bldname}" ]; then
41 msg "Downloading the latest '$CARCH/$pkgver/${_bldname}'..."
42 wget --no-proxy -c "${_bldroot}/${_bldname}" \
43 -O "$SRCDEST/${_bldname}" || return $?
44 ln -fs "$SRCDEST/${_bldname}" "$srcdir/${_bldname}" || return $?
47 msg "Extracting JAR..."
49 bsdtar -xf $srcdir/${_bldname} || return $?
51 cp -r $srcdir/IBJts $pkgdir/opt/IBJts
53 msg "Making it nice..."
54 chmod 0755 $pkgdir/opt/IBJts
55 chmod 0644 $pkgdir/opt/IBJts/*
56 install -Dm755 $srcdir/IBJts.sh $pkgdir/opt/IBJts/IBJts.sh
57 install -Dm644 $srcdir/IBJts.desktop \
58 $pkgdir/usr/share/applications/IBJts.desktop
59 install -Dm644 $srcdir/IBJts_64x64.gif \
60 $pkgdir/usr/share/pixmaps/IBJts_64x64.gif
63 # vim:set ts=4 sw=4 et:
64 md5sums=('87beeb5ab2d9436ee7babb698da51678'
65 'e9e10b820207c951ee929c5a68d6abac'
66 'de672919cfbcd4668a10db082517560a')