void-packages/srcpkgs/luaposix/template
maxice8 36695451c8 luaposix: update to 34.0.4.
Closes: #11727 [via git-merge-pr]
2018-03-06 22:22:39 -08:00

71 lines
1.8 KiB
Bash

# Template file for 'luaposix'
pkgname=luaposix
version=34.0.4
revision=1
lib32disabled=yes
wrksrc="luaposix-release-v${version}"
hostmakedepends="lua51-devel lua52-devel lua-devel"
makedepends="lua51-devel lua52-devel lua-devel"
depends="lua"
short_desc="A POSIX library for Lua programming language"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT"
homepage="http://luaforge.net/projects/luaposix/"
distfiles="https://github.com/luaposix/luaposix/archive/release-v${version}.tar.gz"
checksum=d0110e465fdaeedd6662e9fdd40ae88131f7380bd7e1335adac70c24bb70f718
post_extract() {
cd "${wrksrc}"
mkdir -p lua5.1
mv * lua5.1 || true
cp -a lua5.1 lua5.2
cp -a lua5.1 lua5.3
}
do_build() {
for _lua_version in 5.1 5.2 5.3; do
pushd lua${_lua_version}
lua${_lua_version} build-aux/luke version=${version} PREFIX=/usr \
LUA_INCDIR="${XBPS_CROSS_BASE}/usr/include/lua${_lua_version}" \
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS $CFLAGS"
popd
done
}
do_install() {
for _lua_version in 5.1 5.2 5.3; do
pushd lua${_lua_version}
lua${_lua_version} build-aux/luke PREFIX="${DESTDIR}/usr" install
popd
done
}
post_install() {
vlicense lua5.3/LICENSE
vmkdir usr/share/doc/$pkgname
vcopy "lua5.3/doc/*" usr/share/doc/$pkgname
}
luaposix51_package() {
depends="lua51 lua51-bitlib"
short_desc="${_desc} - Lua 5.1"
pkg_install() {
vlicense "${wrksrc}/lua5.1/LICENSE"
vmove usr/lib/lua/5.1
vmove usr/share/lua/5.1
vmkdir usr/share/doc/$pkgname
vcopy "${wrksrc}/lua5.1/doc/*" usr/share/doc/$pkgname
}
}
luaposix52_package() {
short_desc="${_desc} - Lua 5.2"
depends="lua52"
pkg_install() {
vlicense "${wrksrc}/lua5.2/LICENSE"
vmove usr/lib/lua/5.2
vmove usr/share/lua/5.2
vmkdir usr/share/doc/$pkgname
vcopy "${wrksrc}/lua5.2/doc/*" usr/share/doc/$pkgname
}
}