diff options
author | Alexander F. Rødseth | 2018-07-31 15:09:51 +0200 |
---|---|---|
committer | Alexander F. Rødseth | 2018-07-31 15:09:51 +0200 |
commit | dcf314b165217967826a9aee5aa14fbedeb50f42 (patch) | |
tree | 255d61616e8e8b57f5e91639ef5a9ec7cb6f18bd | |
download | aur-dcf314b165217967826a9aee5aa14fbedeb50f42.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | wasm.conf | 1 |
3 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cc0be22fafde --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +# Generated by mksrcinfo v8 +# Tue Jul 31 13:09:44 UTC 2018 +pkgbase = vmir + pkgdesc = Execute .wasm files directly + pkgver = 0.1 + pkgrel = 1 + url = https://github.com/andoma/vmir + arch = x86_64 + license = MIT + makedepends = clang + makedepends = git + source = git+https://github.com/andoma/vmir.git#commit=b8aebf545cbf570c9e4367cf8f162db457c06bc0 + source = wasm.conf + sha256sums = SKIP + sha256sums = f2f9a8401e8ab2ded3b655477e8eecc8cb4798178512bf8a15cf2263a572cd16 + +pkgname = vmir + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5dff394a0737 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org> + +pkgname=vmir +pkgver=0.1 +pkgrel=1 +pkgdesc='Execute .wasm files directly' +arch=('x86_64') +url='https://github.com/andoma/vmir' +license=('MIT') +makedepends=('clang' 'git') +source=("git+https://github.com/andoma/vmir.git#commit=b8aebf545cbf570c9e4367cf8f162db457c06bc0" + 'wasm.conf') +sha256sums=('SKIP' + 'f2f9a8401e8ab2ded3b655477e8eecc8cb4798178512bf8a15cf2263a572cd16') + +prepare() { + sed -i \ + 's,Need .bc file to parse/run,Please pass a .wasm file as the first argument.,g' \ + "$pkgname/src/main.c" +} + +build() { + cd "$pkgname" + + CC=clang make +} + +package() { + cd "$pkgname" + + install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + # TODO: Make sure the magic header for WASM is correct + install -Dm644 "$srcdir/wasm.conf" "$pkgdir/etc/binfmt.d/wasm.conf" +} + +# vim: ts=2 sw=2 et: diff --git a/wasm.conf b/wasm.conf new file mode 100644 index 000000000000..0392cfde7e19 --- /dev/null +++ b/wasm.conf @@ -0,0 +1 @@ +:WebAssembly:E::\x00\x61\x73\x6d::/usr/bin/vmir: |