# Maintainer: lilydjwg <lilydjwg@gmail.com>
# Contributor: Ahmad Hasan Mubashshir <ahmubashshir@gmail.com>
# from: github
# what: openresty/lua-resty-core
# match! rc[0-9]*$

pkgname=lua-resty-core
pkgver=0.1.35rc1
_upstream_ver=${pkgver/.r/R}
pkgrel=1
pkgdesc='Lua script engine for nginx lua module'
arch=('any')
depends=('luajit' 'lua-resty-lrucache')
url="https://github.com/openresty/lua-resty-core"
license=('BSD-2-Clause')

source=("$pkgname-$pkgver.tar.gz::https://github.com/openresty/$pkgname/archive/v$_upstream_ver.tar.gz")

sha256sums=('e7d719ed25640fea16e21293088d8eb0ed489effc486e2361c211ccaad3499cd')

build() {
	cd "$pkgname-$_upstream_ver"
	make
}

package() {
	cd "$pkgname-$_upstream_ver"
	make DESTDIR="$pkgdir" PREFIX=/usr LUA_LIB_DIR='$(PREFIX)/share/lua/$(LUA_VERSION)' LUA_VERSION=5.1 install
}
