2016-01-10 22:55:55 +00:00
|
|
|
# Template file for 'lua-zlib'
|
|
|
|
pkgname=lua-zlib
|
2016-11-25 05:14:37 +00:00
|
|
|
version=1.0
|
2016-01-10 22:55:55 +00:00
|
|
|
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"
|
2016-11-25 05:14:37 +00:00
|
|
|
checksum=3c24a142fb758fa1efc91cd229462719be5ba8956dbe648e41a68069616b7dee
|
2016-01-10 22:55:55 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|