Mail archive
alpine-aports

[alpine-aports] [PATCH 3/4] testing/lua-mpack: new aport

From: Daniel Sabogal <dsabogalcc_at_gmail.com>
Date: Tue, 2 Aug 2016 15:02:39 -0400

From: Daniel Sabogal <dsabogalcc_at_gmail.com>

https://github.com/tarruda/libmpack
Lua bindings for libmpack
---
 testing/lua-mpack/APKBUILD | 51 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 testing/lua-mpack/APKBUILD
diff --git a/testing/lua-mpack/APKBUILD b/testing/lua-mpack/APKBUILD
new file mode 100644
index 0000000..3585215
--- /dev/null
+++ b/testing/lua-mpack/APKBUILD
_at_@ -0,0 +1,51 @@
+# Contributor: Daniel Sabogal <dsabogalcc_at_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"
-- 
2.8.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Aug 02 2016 - 15:02:39 GMT