void-packages/srcpkgs/lua54-zlib/template

91 lines
2.2 KiB
Bash

# Template file for 'lua54-zlib'
pkgname=lua54-zlib
version=1.2
revision=3
wrksrc="lua-zlib-${version}"
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="lua51-devel lua52-devel lua53-devel lua54-devel zlib-devel"
_desc="Zlib streamng interface for lua"
short_desc="${_desc} (5.4.x)"
maintainer="John Regan <john@jrjrtech.com>"
license="MIT"
homepage="https://github.com/brimworks/lua-zlib/"
distfiles="${homepage}archive/v${version}.tar.gz"
checksum=26b813ad39c94fc930b168c3418e2e746af3b2e80b92f94f306f6f954cc31e7d
post_extract() {
mkdir -p lua51
mv * lua51 || true
cp -a lua51 lua52
cp -a lua51 lua53
cp -a lua51 lua54
}
do_build() {
for luaver in 5.1 5.2 5.3 5.4; do
(
cd lua${luaver//.}
make \
CC=$CC \
LD=$CC \
LIBS="-lz -llua${luaver} -lm" \
INCDIR="-I${XBPS_CROSS_BASE}/usr/include -I${XBPS_CROSS_BASE}/usr/include/lua${luaver}" \
LIBDIR="-L${XBPS_CROSS_BASE}/usr/lib" \
LUACPATH="${DESTDIR}/$(pkg-config --variable=INSTALL_CMOD lua${luaver})" \
LUAPATH="$(pkg-config --variable=INSTALL_LMOD lua${luaver})" \
${makejobs} linux
)
done
}
do_install() {
for luaver in 5.1 5.2 5.3 5.4; do
(
mkdir -p "${DESTDIR}/$(pkg-config --variable=INSTALL_CMOD lua${luaver})"
cd lua${luaver//.}
make \
CC=$CC \
LD=$CC \
LIBS="-lz -llua${luaver} -lm" \
INCDIR="-I${XBPS_CROSS_BASE}/usr/include -I${XBPS_CROSS_BASE}/usr/include/lua${luaver}" \
LIBDIR="-L${XBPS_CROSS_BASE}/usr/lib" \
LUACPATH="${DESTDIR}/$(pkg-config --variable=INSTALL_CMOD lua${luaver})" \
LUAPATH="$(pkg-config --variable=INSTALL_LMOD lua${luaver})" \
DESTDIR="${DESTDIR}" \
${makejobs} install
)
done
vlicense "lua53/README"
}
lua51-zlib_package() {
short_desc="${_desc} (5.1.x)"
pkg_install() {
vmove usr/lib/lua/5.1
vlicense "${wrksrc}/lua51/README"
}
}
lua52-zlib_package() {
short_desc="${_desc} (5.2.x)"
pkg_install() {
vmove usr/lib/lua/5.2
vlicense "${wrksrc}/lua52/README"
}
}
lua53-zlib_package() {
short_desc="${_desc} (5.3.x)"
pkg_install() {
vmove usr/lib/lua/5.3
vlicense "${wrksrc}/lua53/README"
}
}
lua-zlib_package() {
depends="lua53-zlib>=${version}_${revision}"
short_desc="${_desc} (5.3.x) (transitional dummy package)"
build_style=meta
}