Merge pull request #3351 from jprjr/lualdap

New package: lua-lualdap-1.2.0
This commit is contained in:
Toyam Cox 2016-08-21 00:42:11 -04:00 committed by GitHub
commit e4a064100d
6 changed files with 126 additions and 0 deletions

View file

@ -0,0 +1,13 @@
diff --git Makefile Makefile
index 3ff7bc1..f05d15b 100644
--- Makefile
+++ Makefile
@@ -1,8 +1,3 @@
-CFLAGS += $(shell pkg-config --cflags lua)
-LDLIBS += $(shell pkg-config --libs lua) -lldap
-
-LUA_MODULES := $(shell pkg-config --variable=INSTALL_CMOD lua)
-
all: lualdap.so
lualdap.so: lualdap.c

View file

@ -0,0 +1,22 @@
diff --git lualdap.c lualdap.c
index a3f42a9..026e369 100644
--- lualdap.c
+++ lualdap.c
@@ -876,7 +876,7 @@ static int lualdap_search_tostring(lua_State *L)
*/
static int lualdap_createmeta(lua_State *L)
{
- const luaL_reg methods[] = {
+ const luaL_Reg methods[] = {
{"close", lualdap_close},
{"add", lualdap_add},
{"compare", lualdap_compare},
@@ -1043,7 +1043,7 @@ static void set_info(lua_State *L)
*/
int luaopen_lualdap(lua_State *L)
{
- struct luaL_reg lualdap[] = {
+ struct luaL_Reg lualdap[] = {
{"open_simple", lualdap_open_simple},
{NULL, NULL},
};

View file

@ -0,0 +1,20 @@
Copyright (c) 2003-2007 The Kepler Project.
Copyright (c) 2015 Jason A. Donenfeld <Jason@zx2c4.com>.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,69 @@
# Template file for 'lua-lualdap'
pkgname=lua-lualdap
version=1.2.0
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="lua51-devel lua52-devel lua-devel libldap-devel"
short_desc="LDAP bindings for Lua"
maintainer="John Regan <john@jrjrtech.com>"
license="MIT"
homepage="http://git.zx2cf.com/lualdap"
distfiles="http://git.zx2c4.com/lualdap/snapshot/lualdap-${version}.tar.xz"
checksum=126c50f013ebf329c1771ab4d489f5e6eb7b11d2a64412414f1c6bc6e8a69ed8
wrksrc="lualdap-${version}"
post_extract() {
cd ${wrksrc}
for p in ${FILESDIR}/*.patch; do
patch -p0 -i "${p}"
done
mkdir -p lua51
mv * lua51 || true
cp -a lua51 lua52
cp -a lua51 lua53
}
do_build() {
for luaver in 5.1 5.2 5.3; do
cd ${wrksrc}/lua${luaver//.}
make \
CC=$CC \
LD=$CC \
CFLAGS="$(pkg-config --cflags lua${luaver})" \
LDLIBS="$(pkg-config --libs lua${luaver}) -lldap" \
LUA_MODULES="$(pkg-config --variable=INSTALL_CMOD lua${luaver})" \
${makejobs}
done
}
do_install() {
for luaver in 5.1 5.2 5.3; do
cd ${wrksrc}/lua${luaver//.}
make \
CC=$CC \
LD=$CC \
CFLAGS="$(pkg-config --cflags lua${luaver})" \
LDLIBS="$(pkg-config --libs lua${luaver}) -lldap" \
LUA_MODULES="$(pkg-config --variable=INSTALL_CMOD lua${luaver})" \
DESTDIR="${PKGDESTDIR}" \
install
done
vlicense "${FILESDIR}/COPYING"
}
lua51-lualdap_package() {
short_desc+=" - Lua 5.1"
pkg_install() {
vmove usr/lib/lua/5.1
vlicense "${FILESDIR}/COPYING"
}
}
lua52-lualdap_package() {
short_desc+=" - Lua 5.2"
pkg_install() {
vmove usr/lib/lua/5.2
vlicense "${FILESDIR}/COPYING"
}
}

1
srcpkgs/lua51-lualdap Symbolic link
View file

@ -0,0 +1 @@
lua-lualdap

1
srcpkgs/lua52-lualdap Symbolic link
View file

@ -0,0 +1 @@
lua-lualdap