diff options
author | Caleb Maclennan | 2022-03-23 17:22:29 +0300 |
---|---|---|
committer | Caleb Maclennan | 2022-03-23 17:22:29 +0300 |
commit | 4463111143a1784e18db267dab6edae2cc73cb0e (patch) | |
tree | 49f8ba8ce5043822a9f8cf25bc04beb5ac614099 /PKGBUILD | |
download | aur-4463111143a1784e18db267dab6edae2cc73cb0e.tar.gz |
Initial upload: luacheck-git 0.25.0.r42.gca770a4-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9d599e07efff --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Caleb Maclennan <caleb@alerque.com> + +pkgname=luacheck-git +pkgver=0.25.0.r42.gca770a4 +pkgrel=1 +pkgdesc='A tool for linting and static analysis of Lua code' +arch=(any) +url="https://github.com/lunarmodules/${pkgname%-git}" +license=(MIT) +depends=(lua + lua-filesystem + lua-argparse) +makedepends=(luarocks + git) +provides=("${pkgname%-git}=$pkgver") +conflicts=(${pkgname%-git}) +optdepends=('lua-lanes: for parallel checking') +_archive="${pkgname%-git}" +source=("git+$url.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_archive" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$_archive" + luarocks make --pack-binary-rock --deps-mode=none --no-manifest -- ${pkgname%-git}-*.rockspec +} + +package() { + cd "$_archive" + luarocks install --tree="$pkgdir/usr" --deps-mode=none --no-manifest -- ${pkgname%-git}-*.all.rock + sed -i -e "s!$pkgdir!!" "$pkgdir/usr/bin/${pkgname%-git}" + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE +} |