summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-11-04 11:25:25 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-11-04 11:26:15 +0200
commitf689ab928a1aa289b6ccebd6fbd6f2e09b0b4380 (patch)
treeaf9150e9b3a193d556a6ab8eaa2941bcecc7424b /testing
parent7f2ce0ad9116218cc6823508ea140921155b0d45 (diff)
downloadaports-f689ab928a1aa289b6ccebd6fbd6f2e09b0b4380.tar.bz2
aports-f689ab928a1aa289b6ccebd6fbd6f2e09b0b4380.tar.xz
testing/lua-maxminddb: new aport
libmaxminddb bindings for lua
Diffstat (limited to 'testing')
-rw-r--r--testing/lua-maxminddb/APKBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/lua-maxminddb/APKBUILD b/testing/lua-maxminddb/APKBUILD
new file mode 100644
index 000000000..5ce2a0a63
--- /dev/null
+++ b/testing/lua-maxminddb/APKBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Timo Teräs <timo.teras@iki.fi>
+_luaversions="5.1 5.2"
+
+pkgname=lua-maxminddb
+pkgver=0.1
+pkgrel=0
+pkgdesc="libmaxminddb bindings for Lua"
+url="https://github.com/fabled/lua-maxminddb"
+arch="all"
+license="MIT"
+depends=""
+makedepends="libmaxminddb-dev"
+subpackages=
+for _i in $_luaversions; do
+ depends="$depends lua$_i-maxminddb"
+ makedepends="$makedepends lua$_i-dev"
+ subpackages="$subpackages lua$_i-maxminddb:_maxminddb_${_i/./_}"
+done
+install=
+source="$pkgname-$pkgver.tar.gz::https://github.com/fabled/lua-maxminddb/archive/v$pkgver.tar.gz"
+
+_builddir="$srcdir"/lua-maxminddb-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+ for _i in $_luaversions; do
+ cp -a "$_builddir" "$srcdir"/build-$_i || return 1
+ done
+}
+
+build() {
+ cd "$_builddir"
+ for _i in $_luaversions; do
+ cd "$srcdir"/build-$_i
+ msg "build for Lua $_i"
+ make LUA_PKG="lua$_i" \
+ || return 1
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_split_maxminddb() {
+ local _ver=$1
+ pkgdesc="$pkgdesc $_ver"
+ depends=""
+
+ cd "$srcdir"/build-$_ver
+ make install LUA_PKG="lua$_ver" DESTDIR="$subpkgdir"
+}
+
+for _i in $_luaversions; do
+ eval "_maxminddb_${_i/./_}() { _split_maxminddb $_i; }"
+done
+
+md5sums="4dc1537c7f8064535868eacc4a5bd757 lua-maxminddb-0.1.tar.gz"
+sha256sums="414f5eaa818932bc1cbaa7f27dbde31b3e813d75851e468dd1606f2a89373f8b lua-maxminddb-0.1.tar.gz"
+sha512sums="37fb3e37e24dd6188a1d38945056acd8444d0963af5c53b3c3af51f02130d0eeeb2d32428fae9e75f55db49b7caefe557389f93e27208729222b1a91e63dff0a lua-maxminddb-0.1.tar.gz"