summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3e8e37f904ff43310077a5252b800d49f8b9f44e (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
# Former maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>

pkgname=binaryen-git
pkgver=r6565.gcdf9ee0fd
pkgrel=1
pkgdesc="Compiler infrastructure and toolchain library for WebAssembly"
arch=('i686' 'x86_64')
url="https://github.com/WebAssembly/binaryen"
license=('apache')
depends=('gcc-libs')
makedepends=('git' 'cmake')
#checkdepends=('python')
provides=('binaryen')
conflicts=('binaryen')
source=("git+https://github.com/WebAssembly/binaryen.git"
        "binaryen.sh::https://raw.githubusercontent.com/archlinux/svntogit-community/packages/binaryen/trunk/binaryen.sh")
sha256sums=('SKIP'
            'SKIP')


pkgver() {
  cd "binaryen"

  _rev=$(git rev-list --count --all)
  _hash=$(git rev-parse --short HEAD)
  printf "r%s.g%s" "$_rev" "$_hash"
}

build() {
  cd "binaryen"

  cmake \
    -B "_build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    ./
  make -C "_build"
}

check() {
  cd "binaryen/_build"

  #python ../check.py
}

package() {
  cd "binaryen"

  make -C "_build" DESTDIR="$pkgdir" install
  install -Dm755 "$srcdir/binaryen.sh" -t "$pkgdir/etc/profile.d"
}