# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lua-resty-lock
pkgver=0.09
pkgrel=2
pkgdesc="Simple nonblocking lock API for ngx_lua based on shared memory dictionaries"
url="https://github.com/openresty/lua-resty-lock"
arch="noarch !ppc64le !riscv64 !loongarch64"
license="BSD-1-Clause"
depends="lua lua-resty-core"
source="$pkgname-$pkgver.tar.gz::https://github.com/openresty/lua-resty-lock/archive/refs/tags/v$pkgver.tar.gz
fix-version.patch"
options="!check"

package() {
	mkdir -p "$pkgdir/usr/share/lua/common"
	cp -r ./lib/resty "$pkgdir/usr/share/lua/common"
}

sha512sums="
1647c344daf506999b55bba5e9734586906cb612e4c53e8c8f78ba0fa0ff4d9cc1971303d69f18efc2065c47a7c2e5ded41589dc499c4ba58727e8607a2d5b98  lua-resty-lock-0.09.tar.gz
39c01646b0d857241fb13bc1da7363f9356676d9cc44612d279c79412fbd79296003054956a85c2a61169242a82af1251adff206963ad29ff32dee1c548b7f87  fix-version.patch
"
