blob: 00611de5ea3cf7eafe5aec8c580c75360803a8a9 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-ldap
_pkgname=lualdap
pkgver=1.2.3
pkgrel=0
pkgdesc="Lua binding to LDAP"
url="https://github.com/bdellegrazie/lualdap"
arch="noarch"
license="MIT"
depends=""
makedepends="openldap-dev"
subpackages=""
source="$_pkgname-$pkgver.tar.gz::https://github.com/bdellegrazie/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-$_pkgname:_package"
done
prepare() {
default_prepare || return 1
cd "$builddir"
sed -i -e '/LUA_VERSION_NUM/d' config
local lver; for lver in $_luaversions; do
cp -r "$builddir" "$builddir-$lver" || return 1
done
}
build() {
local lver; for lver in $_luaversions; do
msg "Building for Lua $lver..."
cd "$builddir-$lver"
make CFLAGS="-DLDAP_DEPRECATED -fPIC -ansi $(pkg-config --cflags lua$lver)" \
OPENLDAP_LIB="-lldap -llber" || return 1
done
}
package() {
mkdir -p "$pkgdir"
}
_package() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc (for Lua $lver)"
arch="all"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
[ "$lver" = "5.1" ] && replaces="$pkgname"
cd "$builddir-$lver"
make DESTDIR="$subpkgdir" \
LUA_LIBDIR="$(pkg-config --variable=INSTALL_CMOD lua$lver)" \
install
}
md5sums="a9eda2f55640a8c816b4d4c6c3d7ef1b lualdap-1.2.3.tar.gz"
sha256sums="efde10853429fe1c1c208604a352bee395ac897d407f9d7bf9efca62cff02f67 lualdap-1.2.3.tar.gz"
sha512sums="51934d18d1ee97a0130545e657497e51542eef97c338df14e7171f94a2d6395fceb00313e1e64e46e6cdeedf85a17c63284595fdf6fbce8b7abce29d28f1b4a7 lualdap-1.2.3.tar.gz"
|