aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-gversion/APKBUILD
blob: 8b33432406caa2066825d3df1e584d49891dc3cb (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-gversion
_rockname=gversion
_pkgname=gversion.lua
pkgver=0.2.0
pkgrel=2
pkgdesc="Lua library for Gentoo-style versioning format"
url="https://github.com/jirutka/gversion.lua"
arch="noarch"
license="MIT"
depends="lua"
provides=""
source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$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"

	install -m 644 -D "$builddir"/src/gversion.lua \
		"$pkgdir"/usr/share/lua/common/gversion.lua

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

sha512sums="1bae8b3d251cdb1ec6b6aab95214b3b456e2fa9b7b0d1c0f3dd7fb6ae1df170f74fb33386362699eb4cb375d4a885c2fb7513d6d084b79bb4947288d14d3643f  lua-gversion-0.2.0.tar.gz"