summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorYves G2017-09-14 11:39:58 +0200
committerYves G2017-09-14 13:59:32 +0200
commita7f430e6177465449808eab804f6509cc8a6f67c (patch)
tree13108de4a809dd8df3c5ed293fbda8d05f6add6e /PKGBUILD
downloadaur-a7f430e6177465449808eab804f6509cc8a6f67c.tar.gz
init
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..456a9c0e2362
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Yves G. <theYinYeti@yalis.fr>
+
+pkgname=lua51-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=('lua51-lualdap')
+depends=('openldap>=2.1' 'lua51')
+makedepends=('git')
+source=("git+https://github.com/lualdap/lualdap.git"
+ "allow-uri.patch")
+sha1sums=('SKIP'
+ 'a5185d05bf737707937bf3f7177afb33160ff5ec')
+_luaBin=lua5.1
+
+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"
+ sed -i "s/^LUA *:=.*/LUA := lua$($_luaBin -v 2>&1 | grep -Eo '\<[5-9]\..')/" config
+ 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}/"
+}