# Contributor: Carlo Landmeter # Maintainer: Carlo Landmeter pkgname=lua-inspect pkgver=3.0.2 _luaversions="5.1 5.2 5.3" pkgrel=0 pkgdesc="Human-readable representation of Lua tables" url="https://github.com/kikito/inspect.lua" arch="noarch" license="MIT" depends="" depends_dev="" makedepends="$depends_dev" install="" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/inspect.lua/archive/v$pkgver.tar.gz" for _v in $_luaversions; do subpackages="$subpackages lua$_v-${pkgname#*lua-}:split_${_v/./_}" done _builddir="$srcdir/inspect.lua-$pkgver" prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" } 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" } _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 md5sums="ef4822deef428d22eb4f1705ef885788 lua-inspect-3.0.2.tar.gz" sha256sums="c2256b23d40c82e84587098c21ebdaf605a2b3afd13cb5282677eee588e65c37 lua-inspect-3.0.2.tar.gz" sha512sums="7ecff11028cd449b12ef0e6e44294683eac70595a91c56d86528d8a4814557a183bc9db2bb9c0c3668313936ff0a98421550dbccfc2600a8410b810dca020ea2 lua-inspect-3.0.2.tar.gz"