# Contributor: Will Sinatra # Maintainer: Will Sinatra pkgname=lua-lapis-console _rockname=lapis-console pkgver=1.2.0 pkgrel=0 pkgdesc="An interactive console for the Lapis web framework." url="https://github.com/leafo/lapis-console" arch="noarch !ppc64le" #blocked by lua-lapis, which requires lua-etlua license="MIT" makedepends="luarocks" source="$pkgname-$pkgver.tar.gz::https://github.com/leafo/$_rockname/archive/v$pkgver.tar.gz fix_lua_ver.patch" builddir="$srcdir/$_rockname-$pkgver" options="!check" depends="lua-lapis" options="!check" #There are no checks _luaversions="5.1 5.2 5.3 5.4" for _v in $_luaversions; do makedepends="$makedepends lua$_v-dev luarocks$_v" subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" depends="$depends lua$_v lua$_v-lapis" done build() { local lver; for lver in $_luaversions; do msg "Building for Lua $lver..." luarocks-$lver \ LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \ LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \ make --tree="./build" \ --deps-mode=none \ "$_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$lver-lapis" install_if="$pkgname=$pkgver-r$pkgrel lua$lver" local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_rockname/$pkgver-1" 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 mkdir -p "$rockdir" echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } sha512sums=" 90124cb0b72b6588e183e9637d43b054542b49b8163a688b21735205a0161a968df1698fa4d95630b0aa8feccdc7f31e46e50437349c223a02e471e76ff63da8 lua-lapis-console-1.2.0.tar.gz b925424d2b8d88c034a724e40e398e73951168e6bed1ed498f48bde5cb5030e156d74f0ab4694cc1eaf5b36f38972b0f624322483cbf60cbb2ab81dcf68f2624 fix_lua_ver.patch "