summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorZheng Luo2021-02-28 00:15:50 -0500
committerZheng Luo2021-02-28 00:17:06 -0500
commit70dcbf376d0eb7afabcf9bc6d24efba0c1ad5724 (patch)
treeb4470da9cae6a5f0fe6c4e1371ede57c971dec8a /PKGBUILD
downloadaur-wasi-libc-git.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD29
1 files changed, 29 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..05dde7b0b1f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+pkgname="wasi-libc-git"
+pkgver=r208.2b7e73a
+pkgrel=1
+pkgdesc="libc for WebAssembly programs built on top of WASI system calls (from git repo)"
+arch=("x86_64")
+license=('Apache')
+depends=(llvm clang)
+source=('git+https://github.com/WebAssembly/wasi-libc.git#branch=main')
+md5sums=('SKIP')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+makedepends=('git')
+install=wasi-libc.install
+options=('!strip' 'staticlibs')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ make WASM_CC=clang
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+ make install WASM_CC=clang INSTALL_DIR="$pkgdir"/opt/wasi-libc
+}