mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 11:45:18 +03:00
80 lines
2.1 KiB
Text
80 lines
2.1 KiB
Text
# Contributor: Will Sinatra <wpsinatra@gmail.com>
|
|
# Maintainer: Pegah Bahramiani <pb.bahramiani@gmail.com>
|
|
pkgname=lua-lapis
|
|
_rockname="${pkgname#lua-}"
|
|
pkgver=1.10.0
|
|
pkgrel=0
|
|
pkgdesc="A web framework for Lua/MoonScript supporting OpenResty or http.server"
|
|
url="https://leafo.net/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
|
|
lapis-5.1"
|
|
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
|
|
lua$_v-ansicolors
|
|
lua$_v-cjson
|
|
lua-date
|
|
lua$_v-etlua
|
|
lua$_v-filesystem
|
|
lua$_v-loadkit
|
|
lua$_v-lpeg
|
|
lua$_v-mimetypes
|
|
lua$_v-ossl
|
|
lua$_v-pgmoon
|
|
lua$_v-socket
|
|
"
|
|
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
|
|
install -Dm 755 "$srcdir/lapis-$lver" "$subpkgdir/usr/bin/lapis"
|
|
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="
|
|
35c080500d165a9d41c203920237b6b61031bf4cf687441b324027a3004e32c934306b1ab1f6cb3ae2ef7fc12eacab4b2b2d968756bdcb537343529217cfb4b6 lapis-1.10.0.tar.gz
|
|
c4be44e42089e9c99aff2c092a2654b4b7f3814cbc2036c2d0c43742302760be189bd00072584433c78bcee25bfd37a0ced0f62da0f0d27d04e52f3b64a4e33e lapis-5.1
|
|
"
|