blob: 8824f96ac9487fa128e142d65510e95bf6301842 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=lua-inspect
pkgver=3.0.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=""
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() {
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="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"
|