aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-09-08 18:59:32 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-09-08 19:01:42 +0200
commitfd58a1699bbbdab77b09b453762eb9c73cae1123 (patch)
tree566eea0809825023d3b3fb69f74801aa2eb78e2c
parente26bc206e2fbfb7e4611b522a5e25dbd88fa81e0 (diff)
downloadaports-fd58a1699bbbdab77b09b453762eb9c73cae1123.tar.bz2
aports-fd58a1699bbbdab77b09b453762eb9c73cae1123.tar.xz
testing/lua-lzmq: new aport
https://github.com/zeromq/lzmq Lua bindings to ZeroMQ
-rw-r--r--testing/lua-lzmq/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/lua-lzmq/APKBUILD b/testing/lua-lzmq/APKBUILD
new file mode 100644
index 0000000000..e9e670a649
--- /dev/null
+++ b/testing/lua-lzmq/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# TODO: Split C and FFI bindings into subpackages...?
+pkgname=lua-lzmq
+_pkgname=lzmq
+pkgver=0.4.3
+pkgrel=0
+pkgdesc="Lua bindings to ZeroMQ"
+url="https://github.com/zeromq/lzmq"
+arch="noarch"
+license="MIT"
+depends=""
+makedepends="cmake zeromq-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/zeromq/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev"
+ subpackages="$subpackages lua$_v-$_pkgname:_package"
+done
+
+build() {
+ local lver; for lver in $_luaversions; do
+ msg "Building for Lua $lver..."
+
+ mkdir -p "$builddir"/build/$lver
+ cd "$builddir"/build/$lver
+
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_C_FLAGS="$CFLAGS $(pkg-config --cflags lua$lver)" \
+ -DINSTALL_CMOD=/usr/lib/lua/$lver \
+ -DINSTALL_LMOD=/usr/share/lua/$lver \
+ "$builddir" || return 1
+ make || return 1
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_package() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc $lver"
+ arch="all"
+ install_if="lua$lver $pkgname=$pkgver-r$pkgrel"
+
+ cd "$builddir"/build/$lver
+ make DESTDIR="$subpkgdir" install || return 1
+ rm -Rf "$subpkgdir"/usr/share/lzmq
+}
+
+md5sums="c4e51a60a5a26987bdce59e45d674a9e lua-lzmq-0.4.3.tar.gz"
+sha256sums="51ec00117b0570db82b1eba7b62e95d7e98c880a028584b195a98b433dd8edd1 lua-lzmq-0.4.3.tar.gz"
+sha512sums="1bdbbac29de75c145c934c619b9f54d0cfc5f852f271ca9bafd2e0c83fd930b6c6f8a49afab446615c51c24563d31ee3e0f07a0f9a6e817a56f2f1c1b68e968e lua-lzmq-0.4.3.tar.gz"