aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-inspect
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-07-25 11:53:19 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-07-25 11:56:54 +0200
commit85382cd3917b77f0762e3f543653dacda7ee554a (patch)
tree4caae4352ac43c20583999563850f3c9c1dfd813 /main/lua-inspect
parent0868629d2d9bcfdba3653ec073781fcef43c286c (diff)
downloadaports-85382cd3917b77f0762e3f543653dacda7ee554a.tar.bz2
aports-85382cd3917b77f0762e3f543653dacda7ee554a.tar.xz
main/lua-inspect: build for lua 5.[123]
Diffstat (limited to 'main/lua-inspect')
-rw-r--r--main/lua-inspect/APKBUILD23
1 files changed, 19 insertions, 4 deletions
diff --git a/main/lua-inspect/APKBUILD b/main/lua-inspect/APKBUILD
index ef914b7607..8824f96ac9 100644
--- a/main/lua-inspect/APKBUILD
+++ b/main/lua-inspect/APKBUILD
@@ -2,17 +2,21 @@
# Maintainer:
pkgname=lua-inspect
pkgver=3.0.0
-pkgrel=0
+_luaversions="5.1 5.2 5.3"
+pkgrel=1
pkgdesc="Human-readable representation of Lua tables"
url="https://github.com/kikito/inspect.lua"
arch="noarch"
license="MIT"
-depends="lua"
+depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/inspect.lua/archive/v3.0.0.tar.gz"
+for _v in $_luaversions; do
+ subpackages="$subpackages lua$_v-${pkgname#*lua-}:split_${_v/./_}"
+done
_builddir="$srcdir/inspect.lua-$pkgver"
prepare() {
@@ -31,14 +35,25 @@ build() {
package() {
cd "$_builddir"
- install -Dm644 inspect.lua \
- "${pkgdir}/usr/share/lua/5.1/inspect.lua"
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="30a04fb86cd733c549a051b2821b5ff1 lua-inspect-3.0.0.tar.gz"
sha256sums="77c7be558c6116cdf85ccca0a4193fc6bb7c9a83267a4f308c33027caa0962f8 lua-inspect-3.0.0.tar.gz"
sha512sums="4876d9f49147a1bb06b06f91d1c56ce5250d9ccd6e211194a80a30389b6a8f6d99e7cd48811d8fe9a935845662fda164109af4dd63a0f2a911c330980983ce01 lua-inspect-3.0.0.tar.gz"