void-packages/srcpkgs/lua54-luasec/template

88 lines
2.1 KiB
Bash

# Template file for 'lua54-luasec'
pkgname=lua54-luasec
version=1.2.0
revision=2
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"
changelog="https://raw.githubusercontent.com/brunoos/luasec/master/CHANGELOG"
distfiles="https://github.com/brunoos/luasec/archive/v${version}.tar.gz"
checksum=2e86ef8f3486dc1bbecd752d16741a59a01633279facdfe5631f33b6eed1a30a
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
}