void-packages/srcpkgs/lua54-lpeg/template

96 lines
2.4 KiB
Bash

# Template file for 'lua54-lpeg'
pkgname=lua54-lpeg
version=1.0.2
revision=4
hostmakedepends="lua51 lua52 lua53 lua54"
makedepends="lua51-devel lua52-devel lua53-devel lua54-devel"
depends="lua54"
_desc="Pattern-matching library for Lua based on Parsing Expression Grammars"
short_desc="${_desc} (5.4.x)"
maintainer="Tj Vanderpoel (bougyman) <tj@rubyists.com>"
license="MIT"
homepage="http://www.inf.puc-rio.br/~roberto/lpeg/"
distfiles="${homepage}/lpeg-${version}.tar.gz"
checksum=48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe
post_extract() {
mkdir -p lua51
mv * lua51 || true
cp -a lua51 lua52
cp -a lua51 lua53
cp -a lua51 lua54
}
do_build() {
cd ${wrksrc}/lua51
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.1 -fPIC" \
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.1" ${makejobs}
cd ${wrksrc}/lua52
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.2 -fPIC" \
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.2" ${makejobs}
cd ${wrksrc}/lua53
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.3 -fPIC" \
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.3" ${makejobs}
cd ${wrksrc}/lua54
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.4 -fPIC" \
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.4" ${makejobs}
}
do_install() {
cd ${wrksrc}/lua51
vinstall lpeg.so 755 usr/lib/lua/5.1/
vinstall re.lua 644 usr/share/lua/5.1/
cd ${wrksrc}/lua52
vinstall lpeg.so 755 usr/lib/lua/5.2/
vinstall re.lua 644 usr/share/lua/5.2/
cd ${wrksrc}/lua53
vinstall lpeg.so 755 usr/lib/lua/5.3/
vinstall re.lua 644 usr/share/lua/5.3/
cd ${wrksrc}/lua54
vinstall lpeg.so 755 usr/lib/lua/5.4/
vinstall re.lua 644 usr/share/lua/5.4/
vlicense lpeg.html
}
lua51-lpeg_package() {
depends="lua51"
short_desc="${_desc} (5.1.x)"
pkg_install() {
vmove usr/lib/lua/5.1
vmove usr/share/lua/5.1
vlicense ${wrksrc}/lua51/lpeg.html
}
}
lua52-lpeg_package() {
depends="lua52"
short_desc="${_desc} (5.2.x)"
pkg_install() {
vmove usr/lib/lua/5.2
vmove usr/share/lua/5.2
vlicense ${wrksrc}/lua52/lpeg.html
}
}
lua53-lpeg_package() {
depends="lua53"
short_desc="${_desc} (5.3.x)"
pkg_install() {
vmove usr/lib/lua/5.3
vmove usr/share/lua/5.3
vlicense ${wrksrc}/lua53/lpeg.html
}
}
lua-lpeg_package() {
depends="lua53-lpeg>=${version}_${revision}"
short_desc="${_desc} (5.3.x) (transitional dummy package)"
build_style=meta
}