summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6c615a0f040274d2fe87b7888029d6bfe14a895 (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
# Maintainer:
# Contributor: Charles L <charles@crwl.org>
# Contributor: Sanpi <sanpi+aur@homecomputing.fr>

_pkgname="emsdk"
pkgname="$_pkgname"
pkgver=3.1.65
pkgrel=1
pkgdesc='The Emscripten SDK'
url="https://github.com/emscripten-core/emsdk"
license=('MIT')
arch=('any')

depends=(
  'python'
  'cmake'
)

_pkgsrc="$_pkgname-$pkgver"
_pkgext="tar.gz"
source=(
  "$_pkgsrc.$_pkgext"::"https://github.com/emscripten-core/emsdk/archive/${pkgver}.$_pkgext"
)
sha256sums=(
  '6000c66fc5ca81117cbf9f0fd72e288992915bc16df9e6d77c607fab05b472eb'
)

package() {
  install -Dm755 /dev/stdin "$pkgdir/usr/bin/emsdk" << END
#!/bin/sh
cd "/usr/lib/emsdk"
./emsdk "$@"
END

  install -Dm755 /dev/stdin "$pkgdir/usr/bin/emsdk_env.sh" << END
#!/bin/sh
source /usr/lib/emsdk/emsdk_env.sh
END

  cd "$_pkgsrc"
  for file in emsdk emsdk.py *.json *.txt emsdk_env.*; do
    install -Dm755 "$file" -t "$pkgdir/usr/lib/$_pkgname/"
  done

  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}