summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: be2aa0f8ad6f4c91b75bedbb89d5d0f2a780c414 (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>

_rockname=luautf8
pkgname=('lua-utf8' 'lua52-utf8' 'lua51-utf8')
pkgver=0.1.2
_rockrel=0
pkgrel=1
pkgdesc='Add UTF-8 support to Lua, compatible with Lua string module'
arch=('x86_64')
url="https://github.com/starwing/$_rockname"
license=('MIT')
makedepends=('luarocks')
source=("$_rockname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('52578858e4519da7e09d019baef9135fef3ff2dfb0bc0a01e58fba7a70f7be26')

_package_helper() {
  cd "$_rockname-$pkgver"
  luarocks --lua-version="$1" --tree="$pkgdir/usr/" make --deps-mode=none --no-manifest "rockspecs/$_rockname-scm-$_rockrel.rockspec"
}

package_lua-utf8() {
  depends=('lua')
  _package_helper 5.3
}

package_lua52-utf8() {
  depends=('lua52')
  _package_helper 5.2
}

package_lua51-utf8() {
  depends=('lua51')
  _package_helper 5.1
}