lua-lualdap-git/PKGBUILD

39 lines
1.0 KiB
Bash

# Maintainer: Yves G. <theYinYeti@yalis.fr>
pkgname=lua-lualdap-git
pkgver=master
pkgrel=1
pkgdesc="lua binding to openldap"
arch=('i686' 'x86_64')
url="https://github.com/lualdap/lualdap"
# see also https://github.com/luaforge/lualdap/network
license=('MIT')
provides=('lua-lualdap')
depends=('openldap>=2.1' 'lua')
makedepends=('git')
source=("git+https://github.com/lualdap/lualdap.git"
"allow-uri.patch")
sha1sums=('SKIP'
'a5185d05bf737707937bf3f7177afb33160ff5ec')
_luaBin=lua
pkgver() {
cd "${srcdir}/lualdap"
git describe --long --tags | sed -r 's/[vV]*(.*)-([^-]*)-(g[^-]+)/\1.r\2.\3/'
}
build() {
cd "${srcdir}/lualdap"
git apply "${srcdir}/allow-uri.patch"
make
}
package() {
cd "${srcdir}/lualdap"
mkdir -p "${pkgdir}/usr/lib/lua/$($_luaBin -v 2>&1 | grep -Eo '\<[5-9]\..')"
mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
make install DESTDIR="${pkgdir}"
cp -r doc/us "${pkgdir}/usr/share/doc/${pkgname}/html"
cp README.md CONTRIBUTORS.md LICENSE.md "${pkgdir}/usr/share/doc/${pkgname}/"
}