aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-json4/APKBUILD
blob: 85b3e2ef90f29c18cfb0ef660c36a83f29a1024b (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-json4
_rockname=json4lua
pkgver=1.0.0
pkgrel=3
pkgdesc="JSON encoding / decoding module for Lua (JSON4lua)"
url="https://github.com/craigmj/json4lua"
arch="noarch"
license="GPL-2.0"
depends="lua"
provides=""
source="$pkgname-$pkgver.tar.gz::https://github.com/craigmj/$_rockname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_rockname-$pkgver"

_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
	provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel"  # for backward compatibility
done

package() {
	local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"

	cd "$builddir"

	install -D -m 644 json/json.lua "$pkgdir"/usr/share/lua/common/json.lua

	mkdir -p "$rockdir"
	echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}

sha512sums="b42e0848af5284950327ad6986fb651650f84d8287b0c75084e022f6468019e82e9bbc4ce165089582f06a082972e63fe5b8ba1cf6d040fbfdb704db430f3547  lua-json4-1.0.0.tar.gz"