aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-ljsyscall/APKBUILD
blob: e4c5f446d6885e3ac1bc45317f4a1bd95d1040cf (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
# Contributor: Michael Zuo <muh.muhten@gmail.com>
# Maintainer: Michael Zuo <muh.muhten@gmail.com>
pkgname=lua-ljsyscall
pkgver=0.11
pkgrel=0
pkgdesc="LuaJIT Unix syscall FFI"
url="http://www.myriabit.com/ljsyscall/"
arch="all"
license="MIT"
depends=""
makedepends="luajit"
source="${pkgname#lua-}-$pkgver.tar.gz::https://github.com/justincormack/ljsyscall/archive/v$pkgver.tar.gz"
options="!archcheck"

_builddir="$srcdir/${pkgname#lua-}-$pkgver"
build() {
	cd "$_builddir"
	find syscall/* -maxdepth 0 \
		-type d \
		-not -name linux \
		-not -name shared \
		-exec rm -r {} +
	# we don't target mips, so no special case
	find -H syscall/linux/* -maxdepth 0 \
		-type d \
		-not -name "`luajit -e 'print(jit.arch)'`" \
		-exec rm -r {} +
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir/usr/share/lua/5.1"
	cp -a syscall.lua syscall "$pkgdir/usr/share/lua/5.1"
}

md5sums="bd4a13b7bbb3b21cdfe18d7be4d53483  ljsyscall-0.11.tar.gz"
sha256sums="2353f8e512db4b19f86b499cb12396e5915a41f000a80c61435297a72330c6f3  ljsyscall-0.11.tar.gz"
sha512sums="0a78dc6601a0192011428447b5ab18d700ca005720d7e7c9f51fa7f38dc8f8410702da65feb72b7aa161d3934e62b5d2be3d7f345ad19e0d5356b1aa3cef3d7e  ljsyscall-0.11.tar.gz"