APKBUILD 1.14 KB
Newer Older
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
3
pkgname=lua-inspect
4
_rockname=inspect
5
_pkgname=inspect.lua
6
pkgver=3.1.1
7
pkgrel=1
8 9 10 11
pkgdesc="Human-readable representation of Lua tables"
url="https://github.com/kikito/inspect.lua"
arch="noarch"
license="MIT"
12 13
depends="lua"
provides=""
14
subpackages="$pkgname-doc"
15 16 17 18
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"
19
for _v in $_luaversions; do
20
	provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel"  # for backward compatibility
21
done
22 23

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

26
	cd "$builddir"
27

28
	install -Dm644 "$builddir"/inspect.lua \
29 30 31
		"$pkgdir"/usr/share/lua/common/inspect.lua
	install -Dm644 README.md \
		"$pkgdir"/usr/share/doc/$pkgname/README.md
32 33 34

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

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