commit b41544c6adcaf203ee96df8426f2e04a0fffa101 Author: qwjyh Date: Thu May 30 19:38:41 2024 +0900 init diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..7fcf0f8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = luax-git + pkgdesc = Lua interpreter and REPL based on Lua 5.4, augmented with some useful packages. It is also a "compiler" that produces standalone executables from Lua scripts. + pkgver = r590.70bcc33 + pkgrel = 1 + url = https://cdelord.fr/luax.html + arch = x86_64 + arch = aarch64 + license = GPL-3.0-only + makedepends = ninja + makedepends = git + depends = lua + depends = zig + depends = glibc + provides = luax + source = git+https://github.com/CDSoft/luax.git + sha256sums = SKIP + +pkgname = luax-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..ba9b7c0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: qwjyh + + +# TODO: Fix doc gen and test + +pkgname=luax-git +_pkgname="${pkgname%-git}" +pkgver=r590.70bcc33 +pkgrel=1 +pkgdesc="Lua interpreter and REPL based on Lua 5.4, augmented with some useful packages. It is also a \"compiler\" that produces standalone executables from Lua scripts." +depends=('lua' 'zig' 'glibc') +makedepends=('ninja' 'git') +provides=('luax') +arch=('x86_64' 'aarch64') +url="https://cdelord.fr/luax.html" +license=('GPL-3.0-only') +source=("git+https://github.com/CDSoft/luax.git") +sha256sums=('SKIP') + +_distdir="$_pkgname" + +prepare() { + cd "$srcdir/$_distdir" + ninja -f bootstrap.ninja + sed -i "s,zig = .*,zig = $(which zig)," build.ninja + sed -i 's,build $zig: _zig,,' build.ninja +} + +pkgver() { + cd "${_pkgname}" || exit 1 + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$_distdir" + ninja + # TODO: Fails building logo + # ninja doc +} + +check() { + cd "$srcdir/$_distdir" + # TODO: Fails + # ninja test +} + +package() { + cd "$srcdir//$_distdir" + PREFIX=$pkgdir/usr ninja install +} + +# vim: sw=2: