mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/lua-lapis-annotate: new aport
This commit is contained in:
parent
7a5b0f41c0
commit
b4619e863a
67
testing/lua-lapis-annotate/APKBUILD
Normal file
67
testing/lua-lapis-annotate/APKBUILD
Normal file
@ -0,0 +1,67 @@
|
||||
# Contributor: Will Sinatra <wpsinatra@gmail.com>
|
||||
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
|
||||
pkgname=lua-lapis-annotate
|
||||
_rockname=lapis-annotate
|
||||
pkgver=1.2.1
|
||||
pkgrel=0
|
||||
pkgdesc="A Lapis extension that lets you annotate your model files with their schema."
|
||||
url="https://github.com/leafo/lapis-annotate"
|
||||
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"
|
||||
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
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
}
|
||||
|
||||
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="
|
||||
59276d5a95762b414c714cd02f642cffb4eef43e4e575e9c3f5d3c9f9a5304e1afdedebffd8a4ea2f282d94cc3834cb1696b2dc7daf67e0451eab7534564a072 lua-lapis-annotate-1.2.1.tar.gz
|
||||
45353ee44f363ecba441817658c2f30e053ff28901bb954b97119874f461b2716a19216fc38d168c14072d09a599f5aab4fe60543a0ae6882318f961d56761ae fix_lua_ver.patch
|
||||
"
|
||||
11
testing/lua-lapis-annotate/fix_lua_ver.patch
Normal file
11
testing/lua-lapis-annotate/fix_lua_ver.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/lapis-annotate-dev-1.rockspec 2018-04-03 20:38:40.000000000 -0400
|
||||
+++ b/lapis-annotate-dev-1.rockspec 2023-11-02 10:40:14.089599609 -0400
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
dependencies = {
|
||||
- "lua == 5.1",
|
||||
+ "lua >= 5.1",
|
||||
"lapis",
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user