aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2020-10-04 02:27:11 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-10-11 23:52:07 +0000
commitba2035a600e3b0554c8a2adce43759bc1a0854b9 (patch)
tree1c33be236118104cc84c5966d346060cb4ebcf84
parentd71b7c8d60c8f8348ee32d80599700d779586696 (diff)
downloadaports-ba2035a600e3b0554c8a2adce43759bc1a0854b9.tar.gz
aports-ba2035a600e3b0554c8a2adce43759bc1a0854b9.tar.bz2
aports-ba2035a600e3b0554c8a2adce43759bc1a0854b9.tar.xz
community/luacheck: modernize
-rw-r--r--community/luacheck/APKBUILD18
1 files changed, 7 insertions, 11 deletions
diff --git a/community/luacheck/APKBUILD b/community/luacheck/APKBUILD
index 0d58b45e7f..a32ed53da5 100644
--- a/community/luacheck/APKBUILD
+++ b/community/luacheck/APKBUILD
@@ -2,26 +2,22 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=luacheck
pkgver=0.22.1
-pkgrel=0
+pkgrel=1
pkgdesc="A tool for linting and static analysis of Lua code"
url="https://github.com/mpeterv/luacheck"
arch="noarch"
license="MIT"
-depends="cmd:lua lua-filesystem"
-checkdepends="lua-busted"
-source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/$pkgname/archive/$pkgver.tar.gz"
-builddir="$srcdir/$pkgname-$pkgver"
+_luaversion="5.1"
+depends="lua$_luaversion lua$_luaversion-filesystem"
+checkdepends="lua$_luaversion-busted"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/luacheck/archive/$pkgver.tar.gz"
check() {
- cd "$builddir"
- busted .
+ busted-$_luaversion .
}
package() {
- local lver=$(lua -e 'print(_VERSION:match("[%d%.]+"))')
- local lmod_dir="$pkgdir/usr/share/lua/$lver"
-
- cd "$builddir"
+ local lmod_dir="$pkgdir/usr/share/lua/$_luaversion"
mkdir -p "$lmod_dir"
cp -r src/$pkgname "$lmod_dir"/