diff options
author | Guilherme Felipe da Silva <gfsilva.eng@gmail.com> | 2020-03-02 17:06:44 +0100 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-03-03 08:20:35 -0300 |
commit | a36541526d0076f77c912cf79ccc9a5d14bb3cb5 (patch) | |
tree | c35b8a01ecf3081fd963be04494b3ac87eefb7d9 | |
parent | 7b6b2d93ce80b7efa768dadf66ff33454af05e6b (diff) | |
download | aports-a36541526d0076f77c912cf79ccc9a5d14bb3cb5.tar.bz2 aports-a36541526d0076f77c912cf79ccc9a5d14bb3cb5.tar.xz |
testing/lua-pgmoon: new aport
https://github.com/leafo/pgmoon
A pure Lua Postgres driver for use in OpenResty & more
-rw-r--r-- | testing/lua-pgmoon/APKBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/lua-pgmoon/APKBUILD b/testing/lua-pgmoon/APKBUILD new file mode 100644 index 0000000000..b058adb808 --- /dev/null +++ b/testing/lua-pgmoon/APKBUILD @@ -0,0 +1,50 @@ +# Maintainer: Guilherme Felipe da Silva <gfsilva.eng@gmail.com> +pkgname=lua-pgmoon +_rockname="${pkgname#lua-}" +pkgver=1.10.0 +pkgrel=0 +pkgdesc="A pure Lua Postgres driver for use in OpenResty & more" +url="https://github.com/leafo/pgmoon" +license="MIT" +arch="all" +depends="lua-bitop lua-lpeg" +makedepends="luarocks" +options="!check" # Test suite is broken +source="$_rockname-$pkgver.tar.gz::https://github.com/leafo/$_rockname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$_rockname-$pkgver" + +_luaversions="5.1 5.2 5.3" +for _v in $_luaversions; do + makedepends="$makedepends lua$_v-dev luarocks$_v" + subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" +done + +build() { + local lver; for lver in $_luaversions; do + msg "Building for Lua $lver..." + + luarocks-$lver \ + --deps-mode=none \ + LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \ + LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \ + make --tree="./build" \ + "$_rockname-dev-1.rockspec" + done +} + +package() { + mkdir -p "$pkgdir" +} + +_subpackage() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc (for Lua $lver)" + depends="lua$lver" + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + + local path; for path in "lib/luarocks/rocks-$lver" "share/lua/$lver"; do + mkdir -p "$subpkgdir/usr/${path%/*}" + mv "$builddir/build/$path" "$subpkgdir/usr/$path/" + done +} +sha512sums="aa37e57286f1dde1fb475e7c86ccd6d2830cd7246e8ffaa1182b7e0bc65dad4bc84bd28bd161afeef06fbb1b36d734bb3c3cdc22217229b90875a61d1246336a pgmoon-1.10.0.tar.gz" |