aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-07-25 21:38:50 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-25 21:39:25 +0200
commitde0bc2f456d65302a71ae8557947686b245db8eb (patch)
tree046c3cb878847a38ae0caf5192a4f0f5b7426a68
parentec9189e2b709e2d680647c71ca920909121479f5 (diff)
downloadaports-de0bc2f456d65302a71ae8557947686b245db8eb.tar.bz2
aports-de0bc2f456d65302a71ae8557947686b245db8eb.tar.xz
testing/luacheck: new aport
https://github.com/mpeterv/luacheck A tool for linting and static analysis of Lua code
-rw-r--r--testing/luacheck/APKBUILD32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/luacheck/APKBUILD b/testing/luacheck/APKBUILD
new file mode 100644
index 0000000000..c2b566ed5b
--- /dev/null
+++ b/testing/luacheck/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=luacheck
+pkgver=0.20.0
+pkgrel=0
+pkgdesc="A tool for linting and static analysis of Lua code"
+url="https://github.com/mpeterv/luacheck"
+arch="noarch"
+license="MIT"
+depends="lua lua-filesystem"
+checkdepends="lua-busted"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/$pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+check() {
+ cd "$builddir"
+ busted .
+}
+
+package() {
+ local lver=$(lua -e 'print(_VERSION:match("[%d%.]+"))')
+ local lmod_dir="$pkgdir/usr/share/lua/$lver"
+
+ cd "$builddir"
+
+ mkdir -p "$lmod_dir"
+ cp -r src/$pkgname "$lmod_dir"/
+
+ install -D -m 755 bin/$pkgname.lua "$pkgdir"/usr/bin/$pkgname
+}
+
+sha512sums="08b1a64849b329e6ad71b1d7011fac0833de068641270adaa009e9a17139968ab73add3786a508a8787ce1fcfe1f028a35b5434221e4f1f62bea56833e0e65dd luacheck-0.20.0.tar.gz"