summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCaleb Maclennan2022-03-23 17:22:29 +0300
committerCaleb Maclennan2022-03-23 17:22:29 +0300
commit4463111143a1784e18db267dab6edae2cc73cb0e (patch)
tree49f8ba8ce5043822a9f8cf25bc04beb5ac614099 /PKGBUILD
downloadaur-4463111143a1784e18db267dab6edae2cc73cb0e.tar.gz
Initial upload: luacheck-git 0.25.0.r42.gca770a4-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
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
+}