79 lines
2.3 KiB
Bash
79 lines
2.3 KiB
Bash
# Template file for 'lua52'
|
|
pkgname=lua52
|
|
version=5.2.4
|
|
revision=8
|
|
wrksrc=lua-${version}
|
|
makedepends="ncurses-devel readline-devel"
|
|
short_desc="Powerful, fast, lightweight, embeddable scripting language (5.2.x)"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="MIT"
|
|
homepage="https://www.lua.org"
|
|
distfiles="https://www.lua.org/ftp/lua-$version.tar.gz"
|
|
checksum=b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b
|
|
|
|
alternatives="
|
|
lua:lua:/usr/bin/lua5.2
|
|
lua:luac:/usr/bin/luac5.2
|
|
lua:lua.1:/usr/share/man/man1/lua5.2.1
|
|
lua:luac.1:/usr/share/man/man1/luac5.2.1
|
|
lua:lua:/usr/share/doc/lua5.2
|
|
"
|
|
|
|
do_build() {
|
|
sed -i src/Makefile -r \
|
|
-e '/^LUA_(SO|A|T)=/ s;lua;lua5.2;' \
|
|
-e '/^LUAC_T=/ s;luac;luac5.2;'
|
|
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
|
|
CC="$CC" RANLIB="$RANLIB" \
|
|
INSTALL_DATA="cp -d" LUA_SO=liblua5.2.so ${makejobs} linux
|
|
}
|
|
|
|
do_install() {
|
|
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
|
|
TO_BIN="lua5.2 luac5.2" \
|
|
TO_LIB="liblua5.2.a liblua5.2.so liblua5.2.so.${version%.*} liblua5.2.so.${version}" \
|
|
INSTALL_INC="${DESTDIR}/usr/include/lua5.2" \
|
|
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
|
|
|
|
sed ${FILESDIR}/lua.pc \
|
|
-e "s;%VER%;${version%.*};g;s;%REL%;${version};g" \
|
|
-e "s;llua;llua5.2;" \
|
|
-e "s;/include;/include/lua5.2;" \
|
|
> lua5.2.pc
|
|
vinstall lua5.2.pc 644 usr/lib/pkgconfig
|
|
|
|
# Install the documentation
|
|
rm -f doc/*.1
|
|
vmkdir usr/share/doc/lua5.2
|
|
cp -R doc/* ${DESTDIR}/usr/share/doc/lua5.2
|
|
|
|
vlicense doc/readme.html
|
|
|
|
# Rename man pages
|
|
mv ${DESTDIR}/usr/share/man/man1/lua{,5.2}.1
|
|
mv ${DESTDIR}/usr/share/man/man1/luac{,5.2}.1
|
|
}
|
|
|
|
lua52-devel_package() {
|
|
depends="${makedepends} lua52>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
alternatives="
|
|
lua-devel:lua:/usr/include/lua5.2
|
|
lua-devel:/usr/include/lua.h:/usr/include/lua5.2/lua.h
|
|
lua-devel:/usr/include/luaconf.h:/usr/include/lua5.2/luaconf.h
|
|
lua-devel:/usr/include/lua.hpp:/usr/include/lua5.2/lua.hpp
|
|
lua-devel:/usr/include/lualib.h:/usr/include/lua5.2/lualib.h
|
|
lua-devel:/usr/include/lauxlib.h:/usr/include/lua5.2/lauxlib.h
|
|
lua-devel:lua.pc:/usr/lib/pkgconfig/lua5.2.pc
|
|
lua-devel:liblua.a:/usr/lib/liblua5.2.a
|
|
lua-devel:liblua.so:/usr/lib/liblua5.2.so
|
|
"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/share/doc
|
|
}
|
|
}
|