aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-lapis
diff options
context:
space:
mode:
authorpegah.bahramiani <pegah.bahramiani@ev-box.com>2020-03-20 13:32:09 +0100
committerRasmus Thomsen <oss@cogitri.dev>2020-03-25 19:06:16 +0000
commit469f955a495fa668727ab77df4ef0752cc3e3e1e (patch)
treedac0ae80abfd4006d908eac3d473cfb00b4fd24c /testing/lua-lapis
parent24d211b741fae14579118820162dbc5f05d3596f (diff)
downloadaports-469f955a495fa668727ab77df4ef0752cc3e3e1e.tar.bz2
aports-469f955a495fa668727ab77df4ef0752cc3e3e1e.tar.xz
lua-lapis: new aports
A web framework for Lua/MoonScript supporting OpenResty or http.server
Diffstat (limited to 'testing/lua-lapis')
-rw-r--r--testing/lua-lapis/APKBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/lua-lapis/APKBUILD b/testing/lua-lapis/APKBUILD
new file mode 100644
index 0000000000..9762f703cf
--- /dev/null
+++ b/testing/lua-lapis/APKBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Pegah Bahramiani <pb.bahramiani@gmail.com>
+pkgname=lua-lapis
+_rockname="${pkgname#lua-}"
+pkgver=1.7.0
+pkgrel=0
+pkgdesc="A web framework for Lua/MoonScript supporting OpenResty or http.server"
+url="https://https://github.com/leafo/lapis"
+license="MIT"
+arch="all"
+depends="
+ lua-ansicolors
+ lua-cjson
+ lua-date
+ lua-etlua
+ lua-filesystem
+ lua-loadkit
+ lua-lpeg
+ lua-mimetypes
+ lua-ossl
+ lua-pgmoon
+ lua-socket
+"
+makedepends="luarocks"
+options="!check" # Test dependencies not available
+source="$_rockname-$pkgver.tar.gz::https://github.com/leafo/$_rockname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_rockname-$pkgver"
+_luaversions="5.1"
+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"
+ rm "./build/lib/luarocks/rocks-$lver/manifest"
+ 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="9dbbf326e821acad7eacea09664094d038da5e120fdf707992969421be7e1daaf9e2aa9147263d266732cfb9f24ca400aefaa9b4903f8a244d5d26e0ffec4895 lapis-1.7.0.tar.gz"
+