74 lines
1.8 KiB
Bash
74 lines
1.8 KiB
Bash
# Template file for 'lua-zlib'
|
|
pkgname=lua-zlib
|
|
version=0.5
|
|
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=57b6d406f0785a796d470eb60c6a59e4902f3d5af9e083cee5c85acd7afc54ba
|
|
|
|
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"
|
|
}
|
|
}
|