void-packages/srcpkgs/lua54-luaexpat/template

83 lines
2 KiB
Bash

# Template file for 'lua54-luaexpat'
pkgname=lua54-luaexpat
version=1.3.0
revision=3
wrksrc=luaexpat-${version}
make_build_args="EXPAT_INC=-I${XBPS_CROSS_BASE}/usr/include"
makedepends="lua51-devel lua52-devel lua53-devel lua54-devel expat-devel"
depends="lua54"
_desc="XML Expat parsing for the Lua programming language"
short_desc="${_desc} (5.4.x)"
maintainer="Duncaen <mail@duncano.de>"
license="MIT"
homepage="https://matthewwild.co.uk/projects/luaexpat/"
distfiles="https://matthewwild.co.uk/projects/luaexpat/luaexpat-${version}.tar.gz"
checksum=d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3
post_extract() {
cd "${wrksrc}"
mkdir -p lua5.1
sed -n '/Copyright/,/SOFTWARE\./p' doc/us/license.html > LICENSE
# lua 5.3+ does not work with -ansi (integer type detection error)
vsed -i 's, -ansi,,' Makefile
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 luaver in 5.1 5.2 5.3 5.4; do
pushd lua${luaver}
make CC=$CC LUA_V=${luaver} ${make_build_args} ${makejobs} \
LUA_INC=-I${XBPS_CROSS_BASE}/usr/include/lua${luaver}
popd
done
}
do_install() {
for luaver in 5.1 5.2 5.3 5.4; do
pushd lua${luaver}
make DESTDIR=${DESTDIR} LUA_V=${luaver} install
popd
done
vlicense lua5.4/LICENSE
}
lua51-luaexpat_package() {
depends="lua51"
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
}
}
lua52-luaexpat_package() {
depends="lua52"
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
}
}
lua53-luaexpat_package() {
depends="lua53"
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
}
}
luaexpat_package() {
depends="lua51-luaexpat>=${version}_${revision}"
short_desc="${_desc} (5.1.x) (transitional dummy package)"
build_style=meta
}