aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-ejdb
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-12-16 13:28:33 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2015-12-16 13:28:37 +0100
commit80b3fe33434ffe3c8631dfcd32f0c734230f8a9f (patch)
treedbeb0e0e09192b9faa1383e9cffc37cc622616be /testing/lua-ejdb
parent8475029ab7449158ad81a5f71ecc9c0928e7b245 (diff)
downloadaports-80b3fe33434ffe3c8631dfcd32f0c734230f8a9f.tar.bz2
aports-80b3fe33434ffe3c8631dfcd32f0c734230f8a9f.tar.xz
testing/lua-ejdb: new aport
Diffstat (limited to 'testing/lua-ejdb')
-rw-r--r--testing/lua-ejdb/APKBUILD49
-rw-r--r--testing/lua-ejdb/unbundle-inspect.patch17
2 files changed, 66 insertions, 0 deletions
diff --git a/testing/lua-ejdb/APKBUILD b/testing/lua-ejdb/APKBUILD
new file mode 100644
index 0000000000..a846c9337f
--- /dev/null
+++ b/testing/lua-ejdb/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=lua-ejdb
+pkgver=1.2.3
+pkgrel=0
+pkgdesc="EJDB Lua binding for Lua 5.1"
+url="https://github.com/Softmotions/ejdb-lua"
+arch="all"
+license="GPLv2"
+depends="lua5.1-inspect"
+depends_dev=""
+makedepends="$depends_dev lua5.1-dev ejdb-dev"
+install=""
+subpackages=""
+source="http://dev.alpinelinux.org/archive/lua-ejdb/lua-ejdb-$pkgver.tar.gz
+ unbundle-inspect.patch"
+
+_builddir="$srcdir/ejdb-lua-master"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ${CC:-gcc} $CFLAGS $(pkg-config --cflags libejdb) -shared -fPIC -o \
+ luaejdb.so luaejdb.c luabson.c $(pkg-config --libs libejdb)
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm644 luaejdb.so \
+ "$pkgdir"/usr/lib/lua/5.1/luaejdb.so || return 1
+ install -Dm644 ejdb.lua \
+ "$pkgdir"/usr/share/lua/5.1/ejdb.lua || return 1
+}
+
+md5sums="d2295fd8aa3e5bc1188ee261a8645a66 lua-ejdb-1.2.3.tar.gz
+6ffcbd12d1e97b6dc53b29e1f349396b unbundle-inspect.patch"
+sha256sums="75866565110c0c7e3566794b01a79394179b24685fd89c28f7ca93e651435404 lua-ejdb-1.2.3.tar.gz
+da4f1d9b0f9825ba5a832c572d3a3cd5a3e1a45cd91dc4628bdd1f36c4caf8f9 unbundle-inspect.patch"
+sha512sums="d1fc7f2051fdf95a366f140d0f17e4552398138b25f580292bd1cbe2c4d1a373297fb003f103e5703bb296290ca9ad748175cff32ee3c5e1473fd6d00b23f524 lua-ejdb-1.2.3.tar.gz
+de4a79222358e368e740c3c41208ea6562212093e0e214153f137bd1a82ed99623cdc3037094dee713d75ea680a4a43f1c9318fcb4288c78ca4926acff4df386 unbundle-inspect.patch"
diff --git a/testing/lua-ejdb/unbundle-inspect.patch b/testing/lua-ejdb/unbundle-inspect.patch
new file mode 100644
index 0000000000..a2694a004f
--- /dev/null
+++ b/testing/lua-ejdb/unbundle-inspect.patch
@@ -0,0 +1,17 @@
+--- ./ejdb.lua.orig
++++ ./ejdb.lua
+@@ -1,6 +1,6 @@
+ local luaejdb = require("luaejdb")
+ assert(type(luaejdb) == "table")
+-local inspect = require("ejdb.inspect")
++local inspect = require("inspect")
+
+ -- ------------ Misc -----------------------
+
+@@ -532,4 +532,4 @@
+ })
+ luaejdb.Q = luaejdb.B -- Name variations
+
+-return luaejdb;
+\ No newline at end of file
++return luaejdb;