*-luasec: update to 1.0
unify into a single template and add lua54 support
This commit is contained in:
parent
a0d71913f1
commit
6e210a8db2
8 changed files with 90 additions and 127 deletions
1
srcpkgs/lua51-luasec
Symbolic link
1
srcpkgs/lua51-luasec
Symbolic link
|
@ -0,0 +1 @@
|
|||
lua54-luasec
|
|
@ -1,36 +0,0 @@
|
|||
diff --git src/ssl.c src/ssl.c
|
||||
index 2fa6ede..bd8a744 100644
|
||||
--- src/ssl.c
|
||||
+++ src/ssl.c
|
||||
@@ -395,24 +395,30 @@ static int meth_want(lua_State *L)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
-
|
||||
+
|
||||
/**
|
||||
* Return the compression method used.
|
||||
*/
|
||||
static int meth_compression(lua_State *L)
|
||||
{
|
||||
+#if !defined(OPENSSL_NO_COMP)
|
||||
const COMP_METHOD *comp;
|
||||
+#endif
|
||||
p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection");
|
||||
if (ssl->state != LSEC_STATE_CONNECTED) {
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, "closed");
|
||||
return 2;
|
||||
}
|
||||
+#if !defined(OPENSSL_NO_COMP)
|
||||
comp = SSL_get_current_compression(ssl->ssl);
|
||||
if (comp)
|
||||
lua_pushstring(L, SSL_COMP_get_name(comp));
|
||||
else
|
||||
lua_pushnil(L);
|
||||
+#else
|
||||
+ lua_pushnil(L);
|
||||
+#endif
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
# Template file for 'lua51-luasec'
|
||||
pkgname=lua51-luasec
|
||||
reverts=0.6_1
|
||||
version=0.5.1
|
||||
revision=11
|
||||
wrksrc=${pkgname#*-}-${pkgname#*-}-${version}
|
||||
build_style=gnu-makefile
|
||||
hostmakedepends="lua51"
|
||||
makedepends="lua51-devel libressl-devel"
|
||||
depends="lua51"
|
||||
short_desc="Lua binding for OpenSSL library to provide TLS/SSL communication"
|
||||
maintainer="Duncaen <duncaen@voidlinux.org>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/brunoos/luasec"
|
||||
distfiles="https://github.com/brunoos/luasec/archive/${pkgname#*-}-${version}.tar.gz"
|
||||
checksum=6d5c5f8e0521f3194668d9a839774e079e2fd5c45b15538dc7b8cacc56719406
|
||||
|
||||
replaces="luasec<=0.5.1_1"
|
||||
|
||||
do_build() {
|
||||
lua src/options.lua -g ${XBPS_CROSS_BASE}/usr/include/openssl/ssl.h > src/options.h
|
||||
make linux CC=$CC LD=$CC \
|
||||
INC_PATH="-I${XBPS_CROSS_BASE}/usr/include -I${XBPS_CROSS_BASE}/usr/include/lua5.1" \
|
||||
LIB_PATH=-L${XBPS_CROSS_BASE}/usr/lib
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
}
|
1
srcpkgs/lua52-luasec
Symbolic link
1
srcpkgs/lua52-luasec
Symbolic link
|
@ -0,0 +1 @@
|
|||
lua54-luasec
|
|
@ -1,28 +0,0 @@
|
|||
# Template file for 'lua52-luasec'
|
||||
pkgname=lua52-luasec
|
||||
version=0.6
|
||||
revision=10
|
||||
wrksrc=${pkgname#*-}-${pkgname#*-}-${version}
|
||||
build_style=gnu-makefile
|
||||
hostmakedepends="lua52"
|
||||
makedepends="lua52-devel libressl-devel"
|
||||
depends="lua52"
|
||||
short_desc="Lua binding for OpenSSL library to provide TLS/SSL communication"
|
||||
maintainer="Duncaen <duncaen@voidlinux.org>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/brunoos/luasec"
|
||||
distfiles="https://github.com/brunoos/luasec/archive/${pkgname#*-}-${version}.tar.gz"
|
||||
checksum=cef3a35c18beb8a54d9c8ce6260a4cabbd9a386de8711320d084daffad0aed5d
|
||||
|
||||
do_build() {
|
||||
lua src/options.lua -g ${XBPS_CROSS_BASE}/usr/include/openssl/ssl.h > src/options.h
|
||||
make linux CC=$CC LD=$CC \
|
||||
INC_PATH="-I${XBPS_CROSS_BASE}/usr/include -I${XBPS_CROSS_BASE}/usr/include/lua5.2" \
|
||||
LIB_PATH=-L${XBPS_CROSS_BASE}/usr/lib
|
||||
}
|
||||
|
||||
pre_install() {
|
||||
export LUAPATH=${DESTDIR}/usr/share/lua/5.2
|
||||
export LUACPATH=${DESTDIR}/usr/lib/lua/5.2
|
||||
vlicense LICENSE
|
||||
}
|
1
srcpkgs/lua53-luasec
Symbolic link
1
srcpkgs/lua53-luasec
Symbolic link
|
@ -0,0 +1 @@
|
|||
lua54-luasec
|
|
@ -1,34 +0,0 @@
|
|||
# Template file for 'lua53-luasec'
|
||||
pkgname=lua53-luasec
|
||||
version=0.8.1
|
||||
revision=4
|
||||
wrksrc="luasec-luasec-${version}"
|
||||
build_style=gnu-makefile
|
||||
make_build_args="LUAPATH=/usr/share/lua/5.3 LUACPATH=/usr/lib/lua/5.3"
|
||||
make_install_args="${make_build_args}"
|
||||
hostmakedepends="lua53"
|
||||
makedepends="lua53-devel libressl-devel"
|
||||
depends="lua53"
|
||||
short_desc="Lua binding for OpenSSL library to provide TLS/SSL communication"
|
||||
maintainer="Duncaen <duncaen@voidlinux.org>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/brunoos/luasec"
|
||||
distfiles="https://github.com/brunoos/luasec/archive/luasec-${version}.tar.gz"
|
||||
checksum=cc9fc92df3be56add5c9687319951f457c31f5d12ac19cfc09d53056dc24f04e
|
||||
|
||||
do_build() {
|
||||
lua src/options.lua -g ${XBPS_CROSS_BASE}/usr/include/openssl/ssl.h > src/options.h
|
||||
make linux CC=$CC LD=$CC \
|
||||
INC_PATH="-I${XBPS_CROSS_BASE}/usr/include -I${XBPS_CROSS_BASE}/usr/include/lua5.3" \
|
||||
LIB_PATH=-L${XBPS_CROSS_BASE}/usr/lib
|
||||
}
|
||||
|
||||
pre_install() {
|
||||
vlicense LICENSE
|
||||
}
|
||||
|
||||
luasec_package() {
|
||||
depends="lua53-luasec>=${version}_${revision}"
|
||||
short_desc+=" (transitional dummy package)"
|
||||
build_style=meta
|
||||
}
|
87
srcpkgs/lua54-luasec/template
Normal file
87
srcpkgs/lua54-luasec/template
Normal file
|
@ -0,0 +1,87 @@
|
|||
# Template file for 'lua54-luasec'
|
||||
pkgname=lua54-luasec
|
||||
version=1.0
|
||||
revision=1
|
||||
wrksrc="luasec-${version}"
|
||||
build_style=gnu-makefile
|
||||
hostmakedepends="lua51 lua52 lua53 lua54"
|
||||
makedepends="lua51-devel lua52-devel lua53-devel lua54-devel openssl-devel"
|
||||
depends="lua54"
|
||||
_desc="Lua binding for OpenSSL library to provide TLS/SSL communication"
|
||||
short_desc="${_desc} (5.4.x)"
|
||||
maintainer="Duncaen <duncaen@voidlinux.org>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/brunoos/luasec"
|
||||
distfiles="https://github.com/brunoos/luasec/archive/v${version}.tar.gz"
|
||||
checksum=912bfd2050338895207cf24bc8dd26fa9ebddc34006cb8c33d488156d41ac932
|
||||
|
||||
post_extract() {
|
||||
mkdir -p lua5.1
|
||||
mv * lua5.1 || true
|
||||
cp -a lua5.1 lua5.2
|
||||
cp -a lua5.1 lua5.3
|
||||
cp -a lua5.1 lua5.4
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
for luaver in 5.1 5.2 5.3 5.4; do
|
||||
pushd lua${luaver}
|
||||
lua${luaver} src/options.lua -g ${XBPS_CROSS_BASE}/usr/include/openssl/ssl.h > src/options.c
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
do_build() {
|
||||
for luaver in 5.1 5.2 5.3 5.4; do
|
||||
pushd lua${luaver}
|
||||
make linux CC=$CC LD=$CC \
|
||||
INC_PATH="-I${XBPS_CROSS_BASE}/usr/include -I${XBPS_CROSS_BASE}/usr/include/lua${luaver}" \
|
||||
LIB_PATH=-L${XBPS_CROSS_BASE}/usr/lib
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
do_install() {
|
||||
for luaver in 5.1 5.2 5.3 5.4; do
|
||||
pushd lua${luaver}
|
||||
make DESTDIR=${DESTDIR} LUAPATH=/usr/share/lua/${luaver} LUACPATH=/usr/lib/lua/${luaver} install
|
||||
popd
|
||||
done
|
||||
vlicense lua5.4/LICENSE
|
||||
}
|
||||
|
||||
lua51-luasec_package() {
|
||||
depends="lua51"
|
||||
short_desc="${_desc} (5.1.x)"
|
||||
pkg_install() {
|
||||
vlicense "${wrksrc}/lua5.1/LICENSE"
|
||||
vmove usr/lib/lua/5.1
|
||||
vmove usr/share/lua/5.1
|
||||
}
|
||||
}
|
||||
|
||||
lua52-luasec_package() {
|
||||
depends="lua52"
|
||||
short_desc="${_desc} (5.2.x)"
|
||||
pkg_install() {
|
||||
vlicense "${wrksrc}/lua5.2/LICENSE"
|
||||
vmove usr/lib/lua/5.2
|
||||
vmove usr/share/lua/5.2
|
||||
}
|
||||
}
|
||||
|
||||
lua53-luasec_package() {
|
||||
depends="lua53"
|
||||
short_desc="${_desc} (5.3.x)"
|
||||
pkg_install() {
|
||||
vlicense "${wrksrc}/lua5.3/LICENSE"
|
||||
vmove usr/lib/lua/5.3
|
||||
vmove usr/share/lua/5.3
|
||||
}
|
||||
}
|
||||
|
||||
luasec_package() {
|
||||
depends="lua53-luasec>=${version}_${revision}"
|
||||
short_desc+=" (transitional dummy package)"
|
||||
build_style=meta
|
||||
}
|
Loading…
Reference in a new issue