summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 44e4055b3e701a7c8bcdcd298e542602eeb31b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: Steve Engledow <steve@engledow.me>
pkgname=dyalog-bin
pkgver=19.0.50027
pkgrel=3
pkgdesc='Dyalog APL interpreter'
arch=('x86_64')
url="https://www.dyalog.com/download-zone.htm"
license=('custom')
depends=(
    'python'
    'libtool'
    'alsa-lib'
    'gtk2'
    'nss'
    'libxss'
    'nodejs'
    'unixodbc'
    'at-spi2-atk'
)
optdepends=(
    'dotnet-runtime-3.1-bin'
)
makedepends=(
    'binutils'
    'tar'
)
source=("$pkgname-$pkgver.deb::https://www.dyalog.com/uploads/php/download.dyalog.com/download.php?file=19.0/linux_64_${pkgver}_unicode.${CARCH}.deb"
        'LICENSE.pdf::https://www.dyalog.com/uploads/documents/Developer_Software_Licence.pdf')

sha256sums=('dee075d361ebd1d9aa0198f67b32e1b00741a2d636e0f5897c4ee0e704a628c0'
            '94eea122f15d1e43443a6bbb10f375be23cf8ba8aacc6b0381bc89a7791c3172')

options=('!strip')

prepare() {
    ar x "$pkgname-$pkgver.deb"
    tar axvf data.tar.gz
    tar axvf control.tar.gz
}

pkgver() {
    grep Version control | cut -d" " -f2
}

package() {
  version="${pkgver%.*}"
  dyalog="opt/mdyalog/$version/64/unicode"

  # Distribution
  install -d "$pkgdir/$dyalog"
  cp -a "$srcdir/$dyalog"/* "$pkgdir/$dyalog/"

  # Binaries
  install -d "$pkgdir/usr/bin"
  ln -s "/$dyalog/mapl" "$pkgdir/usr/bin/dyalog"
  install -Dm755 "$srcdir/$dyalog/scriptbin/dyalogscript" "$pkgdir/usr/bin/dyalogscript"

  # Docs
  install -d "$pkgdir/usr/share/doc"
  cp -a "$srcdir/usr/share/doc"/* "$pkgdir/usr/share/doc/"

  # Licence
  install -Dm644 "LICENSE.pdf" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.pdf"
}