New package: lua-zlib-0.4

This commit is contained in:
John Regan 2016-01-10 16:55:55 -06:00 committed by John Regan
parent ce7bf73f34
commit ef3cb418f7
3 changed files with 75 additions and 0 deletions

73
srcpkgs/lua-zlib/template Normal file
View file

@ -0,0 +1,73 @@
# 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"
}
}

1
srcpkgs/lua51-zlib Symbolic link
View file

@ -0,0 +1 @@
lua-zlib

1
srcpkgs/lua52-zlib Symbolic link
View file

@ -0,0 +1 @@
lua-zlib