APKBUILD 1.49 KB
Newer Older
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
3
pkgname=lua-inspect
4
pkgver=3.1.0
5
_luaversions="5.1 5.2 5.3"
6
pkgrel=0
7 8 9 10
pkgdesc="Human-readable representation of Lua tables"
url="https://github.com/kikito/inspect.lua"
arch="noarch"
license="MIT"
11
depends=""
12 13 14 15
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
16
source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/inspect.lua/archive/v$pkgver.tar.gz"
17 18 19
for _v in $_luaversions; do
        subpackages="$subpackages lua$_v-${pkgname#*lua-}:split_${_v/./_}"
done
20 21 22

_builddir="$srcdir/inspect.lua-$pkgver"
build() {
23
	return 0
24 25 26 27 28 29 30 31 32 33
}

package() {
	cd "$_builddir"
	install -Dm644 README.md \
		"${pkgdir}/usr/share/doc/${pkgname}/README.md"
	install -Dm644 MIT-LICENSE.txt \
		"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

34 35 36 37 38 39 40 41 42 43 44 45 46
_split() {
	cd "$_builddir"
	local _ver="$1"
	install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
	pkgdesc="Human-readable representation of Lua $_ver tables"
	install -Dm644 inspect.lua \
		"$subpkgdir/usr/share/lua/$_ver/inspect.lua" || return 1
}

for _v in $_luaversions; do
        eval "split_${_v/./_}() { _split $_v; }"
done

47 48 49
md5sums="d8aa2fb827c5ac91ea31a267a65a5f93  lua-inspect-3.1.0.tar.gz"
sha256sums="ce31e30c423d86b1039bef8f30ab801ebbd9fa8721dbc982f60b6f460a76fbbc  lua-inspect-3.1.0.tar.gz"
sha512sums="77ed06d81d8c4e407915bac6b8b0ca7535ef721dff6ef9d7ca5a76c0f10363aa9700fd40a5fa21745b68bc42d06788217d4a24d629c29f4b16a60e653b1471e5  lua-inspect-3.1.0.tar.gz"