aboutsummaryrefslogtreecommitdiffstats
path: root/community/luacheck/APKBUILD
blob: 89d2a46874dc08745aadcf8dddabbb63057b73e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=luacheck
pkgver=0.22.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="cmd:lua lua-filesystem"
checkdepends="lua-busted"
source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/$pkgname/archive/$pkgver.tar.gz
	fix-caching-spec.patch"
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="8264000711214e8451307e7f51a45b06d2fcd5da0d3cb49952d54b07a9448431ae3fd68a8cd0a27c73c3b03e6de74e8ae786c139707e16cf938921ab582d3bfd  luacheck-0.22.0.tar.gz
43eb51299382083ad97b136c9d8d45f0422ee90a48d5d256b3b41ae98a7e6b714589a637fcef6359d54ec581229eedba86c86107866fd9baeb9a60e91145da20  fix-caching-spec.patch"