# Template file for 'lua54-cldr'
pkgname=lua54-cldr
version=0.3.0
revision=1
hostmakedepends="lua51 lua52 lua53 lua54 luarocks-lua54"
depends="lua54-penlight"
short_desc="Lua interface to Unicode CLDR data"
maintainer="Luciogi <githubvoidlinux.supremacy429@passinbox.com>"
license="MIT"
homepage="https://github.com/alerque/cldr-lua"
distfiles="https://github.com/alerque/cldr-lua/archive/refs/tags/v${version}.tar.gz"
checksum=bf38132c274a35b500787668fd561302374c6687333ff8be0c6751ad35151399

_rockname=${pkgname#lua54-}
_rocksrel=0
_pkg() {
	luarocks --lua-version="$1" --tree="${PKGDESTDIR}/usr/" \
		make --deps-mode=none --no-manifest "rockspecs/${_rockname}-${version}-${_rocksrel}.rockspec"
}

do_install() {
	_pkg 5.4

	vlicense LICENSE
}

lua53-cldr_package() {
	metapackage=yes
	depends="lua53 lua53-penlight"
	pkg_install() {
		_pkg 5.3
	}
}

lua52-cldr_package() {
	metapackage=yes
	depends="lua52 lua52-penlight"
	pkg_install() {
		_pkg 5.2
	}
}

lua51-cldr_package() {
	metapackage=yes
	depends="lua51 lua51-penlight"
	pkg_install() {
		_pkg 5.1
	}
}
