summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c16529e0912d00fab76eb73be5a3c5478ee0d31f (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Kilian Guillaume "cafehaine" <kilian dot guillaume at gmail dot com>

_rockname=std-_debug
pkgbase=lua-$_rockname
pkgname=("lua-$_rockname" "lua53-$_rockname" "lua52-$_rockname" "lua51-$_rockname")
_pkgname=_debug
pkgver=1.0.1
_rockrel=1
pkgrel=5
pkgdesc='Lua Debug Hints Library'
arch=(any)
url="https://github.com/lua-stdlib/$_pkgname"
license=(MIT)
makedepends=(lua
             lua51
             lua52
             lua53
             luarocks)
source=("$pkgbase-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('efc560540f08dcf880ac48c6ab527bd741bbe3d6d66202a3c8be3ff5c9e1e907')

_package_helper() {
	cd "$_pkgname-$pkgver"
	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
		make --deps-mode=none --no-manifest "${_rockname/-/.}-$pkgver-$_rockrel.rockspec"
	install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.md
}

package_lua-std-_debug() {
	depends+=(lua)
	_package_helper 5.4
}

package_lua53-std-_debug() {
	depends+=(lua53)
	_package_helper 5.3
}

package_lua52-std-_debug() {
	depends+=(lua52)
	_package_helper 5.2
}

package_lua51-std-_debug() {
	depends+=(lua51)
	_package_helper 5.1
}