summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5142109b46026457d46587f81e75be6ac5ff8556 (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
# shellcheck shell=bash disable=SC2034,SC2154
# Maintainer: Wu Zhenyu <wuzhenyu@ustc.edu>
_pkgname=lua-template
pkgname=(lua{,53}-"$_pkgname")
pkgver=1.0.0
pkgrel=1
pkgdesc="Efficient template engine for Lua"
arch=(x86 x86_64 arm aarch64)
url=https://github.com/anaef/lua-template
license=(MIT)
makedepends=(luarocks git)
_revision=1
source=("https://luarocks.org/manifests/anaef/$_pkgname-$pkgver-$_revision.rockspec")
sha256sums=('538a000e6c889903a5c853718f75ceccb5032f555d28fa06f742429c6c8b3a68')
_lua_version=5.4

_package() {
	install -Dm644 ./*.rockspec -t $1
	luarocks install --no-manifest --lua-version=$1 --tree="$pkgdir/usr/" --deps-mode=none $1/*.rockspec
}

package_lua53-lua-template() {
	local version=5.3
	_package $version
}

package_lua-lua-template() {
	local version=$_lua_version
	_package $version
}