void-packages/srcpkgs/lua54-luaposix/template

104 lines
2.7 KiB
Bash

# Template file for 'lua54-luaposix'
pkgname=lua54-luaposix
version=35.0
revision=1
wrksrc=luaposix-${version}
hostmakedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
depends="lua54 lua54-stdlib-normalize"
_desc="POSIX library for Lua programming language"
short_desc="${_desc} (5.4.x)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="http://luaforge.net/projects/luaposix/"
distfiles="https://github.com/luaposix/luaposix/archive/refs/tags/v${version}.tar.gz"
checksum=a4edf2f715feff65acb009e8d1689e57ec665eb79bc36a6649fae55eafd56809
lib32disabled=yes
post_extract() {
cd "${wrksrc}"
mkdir -p lua5.1
mv * lua5.1 || true
cp -a lua5.1 lua5.2
cp -a lua5.1 lua5.3
cp -a lua5.1 lua5.4
}
do_build() {
for _lua_version in 5.1 5.2 5.3 5.4; 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 5.4; do
pushd lua${_lua_version}
lua${_lua_version} build-aux/luke PREFIX="${DESTDIR}/usr" install
popd
done
}
post_install() {
vlicense lua5.4/LICENSE
vmkdir usr/share/doc/$pkgname
vcopy "lua5.4/doc/*" usr/share/doc/$pkgname
}
lua51-luaposix_package() {
depends="lua51 lua51-stdlib-normalize lua51-bitlib"
short_desc="${_desc} (5.1.x)"
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
}
}
lua52-luaposix_package() {
depends="lua52 lua52-stdlib-normalize"
short_desc="${_desc} (5.2.x)"
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
}
}
lua53-luaposix_package() {
depends="lua53 lua53-stdlib-normalize"
short_desc="${_desc} (5.3.x)"
pkg_install() {
vlicense "${wrksrc}/lua5.3/LICENSE"
vmove usr/lib/lua/5.3
vmove usr/share/lua/5.3
vmkdir usr/share/doc/$pkgname
vcopy "${wrksrc}/lua5.3/doc/*" usr/share/doc/$pkgname
}
}
luaposix51_package() {
depends="lua51-luaposix>=${version}_${revision}"
short_desc="${_desc} (5.1.x) (transitional dummy package)"
build_style=meta
}
luaposix52_package() {
depends="lua52-luaposix>=${version}_${revision}"
short_desc="${_desc} (5.2.x) (transitional dummy package)"
build_style=meta
}
luaposix_package() {
depends="lua53-luaposix>=${version}_${revision}"
short_desc="${_desc} (5.3.x) (transitional dummy package)"
build_style=meta
}