void-packages/srcpkgs/lua-zlib/template

74 lines
1.8 KiB
Bash
Raw Normal View History

2016-01-10 22:55:55 +00:00
# Template file for 'lua-zlib'
pkgname=lua-zlib
version=0.4
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="lua51-devel lua52-devel lua-devel zlib-devel"
short_desc="Zlib streamng interface for lua"
maintainer="John Regan <john@jrjrtech.com>"
license="MIT"
homepage="https://github.com/brimworks/lua-zlib/"
distfiles="${homepage}archive/v${version}.tar.gz"
checksum=2d8b13fe4c4c9d2997388d23ebe4868b4e38214e7b41ba3b8b9b2c043db762d0
post_extract() {
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 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; 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+=" - Lua 5.1"
pkg_install() {
vmove usr/lib/lua/5.1
vlicense "${wrksrc}/lua51/README"
}
}
lua52-zlib_package() {
short_desc+=" - Lua 5.2"
pkg_install() {
vmove usr/lib/lua/5.2
vlicense "${wrksrc}/lua52/README"
}
}