diff options
-rw-r--r-- | community/luacheck/APKBUILD | 18 |
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 @@ | |||
2 | # Maintainer: Jakub Jirutka <jakub@jirutka.cz> | 2 | # Maintainer: Jakub Jirutka <jakub@jirutka.cz> |
3 | pkgname=luacheck | 3 | pkgname=luacheck |
4 | pkgver=0.22.1 | 4 | pkgver=0.22.1 |
5 | pkgrel=0 | 5 | pkgrel=1 |
6 | pkgdesc="A tool for linting and static analysis of Lua code" | 6 | pkgdesc="A tool for linting and static analysis of Lua code" |
7 | url="https://github.com/mpeterv/luacheck" | 7 | url="https://github.com/mpeterv/luacheck" |
8 | arch="noarch" | 8 | arch="noarch" |
9 | license="MIT" | 9 | license="MIT" |
10 | depends="cmd:lua lua-filesystem" | 10 | _luaversion="5.1" |
11 | checkdepends="lua-busted" | 11 | depends="lua$_luaversion lua$_luaversion-filesystem" |
12 | source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/$pkgname/archive/$pkgver.tar.gz" | 12 | checkdepends="lua$_luaversion-busted" |
13 | builddir="$srcdir/$pkgname-$pkgver" | 13 | source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/luacheck/archive/$pkgver.tar.gz" |
14 | 14 | ||
15 | check() { | 15 | check() { |
16 | cd "$builddir" | 16 | busted-$_luaversion . |
17 | busted . | ||
18 | } | 17 | } |
19 | 18 | ||
20 | package() { | 19 | package() { |
21 | local lver=$(lua -e 'print(_VERSION:match("[%d%.]+"))') | 20 | local lmod_dir="$pkgdir/usr/share/lua/$_luaversion" |
22 | local lmod_dir="$pkgdir/usr/share/lua/$lver" | ||
23 | |||
24 | cd "$builddir" | ||
25 | 21 | ||
26 | mkdir -p "$lmod_dir" | 22 | mkdir -p "$lmod_dir" |
27 | cp -r src/$pkgname "$lmod_dir"/ | 23 | cp -r src/$pkgname "$lmod_dir"/ |