diff options
author | Daniel Sabogal <dsabogalcc@gmail.com> | 2016-08-02 15:02:39 -0400 |
---|---|---|
committer | Bartłomiej Piotrowski <b@bpiotrowski.pl> | 2016-08-03 12:22:24 +0200 |
commit | 358ef013cc3a27568d1017c62695ea42ee86a7c2 (patch) | |
tree | de83fa4267f36b94416dffb0ceeed31635a8f0ef /testing/lua-mpack | |
parent | 90924b2f089aba969e51bc58ed9478c30aa41bad (diff) | |
download | aports-358ef013cc3a27568d1017c62695ea42ee86a7c2.tar.bz2 aports-358ef013cc3a27568d1017c62695ea42ee86a7c2.tar.xz |
testing/lua-mpack: new aport
https://github.com/tarruda/libmpack
Lua bindings for libmpack
Diffstat (limited to 'testing/lua-mpack')
-rw-r--r-- | testing/lua-mpack/APKBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/lua-mpack/APKBUILD b/testing/lua-mpack/APKBUILD new file mode 100644 index 0000000000..35852150db --- /dev/null +++ b/testing/lua-mpack/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Daniel Sabogal <dsabogalcc@gmail.com> +# Maintainer: +pkgname=lua-mpack +pkgver=1.0.2 +_lua_versions="5.1 5.2" +pkgrel=0 +_pkgdesc="Libmpack bindings for Lua" +pkgdesc="$_pkgdesc" +url="https://github.com/tarruda/libmpack" +arch="all" +license="MIT" +depends="" +depends_dev="" +makedepends="" +install="" +subpackages="" +source="libmpack-$pkgver.tar.gz::https://github.com/tarruda/libmpack/archive/$pkgver.tar.gz" +for _v in $_lua_versions; do + makedepends="$makedepends lua$_v-dev" + subpackages="$subpackages lua$_v-mpack:split_${_v/./_}" +done + +builddir="$srcdir"/libmpack-$pkgver + +build() { + cd "$builddir" + gcc $CFLAGS -fPIC -c binding/lua/lmpack.c -o lmpack.o || return 1 + gcc -shared -o mpack.so lmpack.o || return 1 +} + +package() { + arch="noarch" + mkdir -p "$pkgdir" +} + +_split() { + local _ver="$1" + install_if="lua$_ver $pkgname=$pkgver-r$pkgrel" + pkgdesc="$_pkgdesc $_ver" + cd "$srcdir"/libmpack-$pkgver || return 1 + install -Dm755 mpack.so \ + "$subpkgdir"/usr/lib/lua/$_ver/mpack.so || return 1 +} + +for _v in $_lua_versions; do + eval "split_${_v/./_}() { _split $_v; }" +done + +md5sums="a6320e37991bb56520d4670419edb43c libmpack-1.0.2.tar.gz" +sha256sums="9c570b2aab81b0c56d97cbd8fc483dc431b69510fd9becb4a1845291563e8bc9 libmpack-1.0.2.tar.gz" +sha512sums="307ae26799e59224dd624d1f5473c86d5cf975155c58b7ccfd17be98321afb0f7235d06a7a2c50112d4630b3cc7c185c9b307007be5cdbd792819ec2991fa3d2 libmpack-1.0.2.tar.gz" |