73 lines
1.8 KiB
Bash
73 lines
1.8 KiB
Bash
# Template file for 'lua-zlib'
|
|
pkgname=lua-zlib
|
|
version=1.0
|
|
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=3c24a142fb758fa1efc91cd229462719be5ba8956dbe648e41a68069616b7dee
|
|
|
|
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"
|
|
}
|
|
}
|