aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-inspect/APKBUILD
blob: bd90124a95aa21e28b0b193d61b9f371e8139b7a (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=lua-inspect
_rockname=inspect
_pkgname=inspect.lua
pkgver=3.1.1
pkgrel=1
pkgdesc="Human-readable representation of Lua tables"
url="https://github.com/kikito/inspect.lua"
arch="noarch"
license="MIT"
depends="lua"
provides=""
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
	provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel"  # for backward compatibility
done

package() {
	local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"

	cd "$builddir"

	install -Dm644 "$builddir"/inspect.lua \
		"$pkgdir"/usr/share/lua/common/inspect.lua
	install -Dm644 README.md \
		"$pkgdir"/usr/share/doc/$pkgname/README.md

	mkdir -p "$rockdir"
	echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}

sha512sums="d9e6f605033b43ac07f6ab731b1c10f59ebd0a64bb3d6449cef39b2fc43d9ad0eb062a000f76bc9b25222a52a3b344ab3a8af7b6bfe3d92a52447faf5dfbcbbd  lua-inspect-3.1.1.tar.gz"