blob: f0b9d8c23bef60c97f258a7ed938fd202977f1fa (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-toml
pkgver=2.0.0
pkgrel=1
pkgdesc="TOML decoder/encoder for Lua"
url="https://github.com/jonstoler/lua-toml"
arch="noarch"
license="Happy"
checkdepends="lua-busted luajit"
source="$pkgname-$pkgver.tar.gz::https://github.com/jonstoler/lua-toml/archive/v$pkgver.tar.gz"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
checkdepends="$checkdepends lua$_v lua$_v-busted"
done
check() {
local lver; for lver in $_luaversions jit; do
msg "Testing on lua$lver"
lua$lver /usr/bin/busted
done
}
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc $lver"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-0"
cd "$builddir"
install -m 644 -D toml.lua "$subpkgdir"/usr/share/lua/$lver/toml.lua
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
sha512sums="b2cb1a54ff57cace7bf7a12f959bf7cdc037fa1f536039ae54d94421f4ede118194427462d19fed221bce3425f6e6b7a42d2fb42338e1327075d329754b30782 lua-toml-2.0.0.tar.gz"
|