summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD41
2 files changed, 33 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8e56ca078390..66e6f4d587ee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,16 @@
pkgbase = luacheck
- pkgdesc = A tool for linting and static analysis of Lua code.
- pkgver = 0.23.0
- pkgrel = 2
- url = https://github.com/mpeterv/luacheck
+ pkgdesc = A tool for linting and static analysis of Lua code
+ pkgver = 0.26.0
+ pkgrel = 1
+ url = https://github.com/lunarmodules/luacheck
arch = any
license = MIT
+ makedepends = luarocks
depends = lua
depends = lua-filesystem
+ depends = lua-argparse
optdepends = lua-lanes: for parallel checking
- source = https://github.com/mpeterv/luacheck/archive/0.23.0.tar.gz
- sha256sums = b4edf3a7702519502696d4ac7372ed1bd6a82ded63bf81f2b1d7e9b37711be2b
+ source = https://github.com/lunarmodules/luacheck/archive/v0.26.0/luacheck-0.26.0.tar.gz
+ sha256sums = 78b74cae0e94155e500755c8e60d921ee7250cfec2acd8ab4df480625c425594
pkgname = luacheck
-
diff --git a/PKGBUILD b/PKGBUILD
index 9ecc4527c233..149c6d93ca5b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,32 @@
-# Maintainer: Simon Legner <Simon.Legner@gmail.com>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+# Contributor: Simon Legner <Simon.Legner@gmail.com>
# Contributor: Pieter Goetschalckx <3.14.e.ter at gmail dot com>
pkgname=luacheck
-pkgver=0.23.0
-pkgrel=2
-pkgdesc="A tool for linting and static analysis of Lua code."
-arch=('any')
-url="https://github.com/mpeterv/luacheck"
-license=('MIT')
-depends=('lua' 'lua-filesystem')
+pkgver=0.26.0
+pkgrel=1
+_rockrel=1
+pkgdesc='A tool for linting and static analysis of Lua code'
+arch=(any)
+url="https://github.com/lunarmodules/$pkgname"
+license=(MIT)
+depends=(lua
+ lua-filesystem
+ lua-argparse)
+makedepends=(luarocks)
optdepends=('lua-lanes: for parallel checking')
-source=("https://github.com/mpeterv/$pkgname/archive/$pkgver.tar.gz")
-sha256sums=('b4edf3a7702519502696d4ac7372ed1bd6a82ded63bf81f2b1d7e9b37711be2b')
+_archive="$pkgname-$pkgver"
+source=("$url/archive/v$pkgver/$_archive.tar.gz")
+sha256sums=('78b74cae0e94155e500755c8e60d921ee7250cfec2acd8ab4df480625c425594')
+
+build() {
+ cd "$_archive"
+ luarocks make --pack-binary-rock --deps-mode=none --no-manifest -- rockspecs/$pkgname-$pkgver-$_rockrel.rockspec
+}
package() {
- cd "$pkgname-$pkgver"
- mkdir -p "$pkgdir/usr/share/lua/5.3/luacheck/stages"
- find src/luacheck -maxdepth 1 -type f -exec install -Dm644 {} "$pkgdir/usr/share/lua/5.3/luacheck" \;
- find src/luacheck/stages -maxdepth 1 -type f -exec install -Dm644 {} "$pkgdir/usr/share/lua/5.3/luacheck/stages" \;
- install -Dm755 "bin/luacheck.lua" "$pkgdir/usr/bin/luacheck"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$_archive"
+ luarocks install --tree="$pkgdir/usr" --deps-mode=none --no-manifest -- $pkgname-$pkgver-$_rockrel.all.rock
+ sed -i -e "s!$pkgdir!!" "$pkgdir/usr/bin/$pkgname"
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}