summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad64f67fd856a7a67f070449484b3a290053692e (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
# Maintainer: Luong The Minh Quang <luci at devel.faith>
pkgname=wavm-git
pkgdesc='WebAssembly Virtual Machine'
pkgver=r2368.93c3ad73
pkgrel=1
arch=('x86_64')
url='https://github.com/WAVM/WAVM'
license=('custom')
depends=('llvm')
makedepends=('git' 'cmake' 'gcc')
source=("git+https://github.com/WAVM/WAVM/#branch=master")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/WAVM"
  printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}

prepare() {
  cd WAVM
  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr .. -DWAVM_ENABLE_LTO=ON
}

build() {
  cd WAVM/build
  make
}

package() {
  cd WAVM/build
  make DESTDIR="$pkgdir" install
  install -Dm644 ../LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}