aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-inspect/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/lua-inspect/APKBUILD')
-rw-r--r--main/lua-inspect/APKBUILD40
1 files changed, 17 insertions, 23 deletions
diff --git a/main/lua-inspect/APKBUILD b/main/lua-inspect/APKBUILD
index 91a6b1f4fc..7040cdab3e 100644
--- a/main/lua-inspect/APKBUILD
+++ b/main/lua-inspect/APKBUILD
@@ -1,48 +1,42 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=lua-inspect
+_pkgname=inspect.lua
pkgver=3.1.0
-_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=""
+makedepends=""
subpackages="$pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/inspect.lua/archive/v$pkgver.tar.gz"
+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
- subpackages="$subpackages lua$_v-${pkgname#*lua-}:split_${_v/./_}"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_package"
done
-_builddir="$srcdir/inspect.lua-$pkgver"
-build() {
- return 0
-}
-
package() {
- cd "$_builddir"
+ 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
-}
+_package() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
-for _v in $_luaversions; do
- eval "split_${_v/./_}() { _split $_v; }"
-done
+ install -Dm644 "$builddir"/inspect.lua \
+ "$subpkgdir"/usr/share/lua/$lver/inspect.lua
+}
md5sums="d8aa2fb827c5ac91ea31a267a65a5f93 lua-inspect-3.1.0.tar.gz"
sha256sums="ce31e30c423d86b1039bef8f30ab801ebbd9fa8721dbc982f60b6f460a76fbbc lua-inspect-3.1.0.tar.gz"