76 lines
2.2 KiB
Bash
76 lines
2.2 KiB
Bash
# Template file for 'lua'
|
|
pkgname=lua
|
|
version=5.3.4
|
|
revision=2
|
|
makedepends="ncurses-devel readline-devel"
|
|
short_desc="Powerful, fast, lightweight, embeddable scripting language"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
homepage="http://www.lua.org"
|
|
license="MIT"
|
|
distfiles="http://www.lua.org/ftp/lua-$version.tar.gz"
|
|
checksum=f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c
|
|
|
|
alternatives="
|
|
lua:lua:/usr/bin/lua5.3
|
|
lua:luac:/usr/bin/luac5.3
|
|
lua:lua.1:/usr/share/man/man1/lua5.3.1
|
|
lua:luac.1:/usr/share/man/man1/luac5.3.1
|
|
lua:lua:/usr/include/lua5.3
|
|
lua:/usr/include/lua.h:/usr/include/lua5.3/lua.h
|
|
lua:/usr/include/luaconf.h:/usr/include/lua5.3/luaconf.h
|
|
lua:/usr/include/lua.hpp:/usr/include/lua5.3/lua.hpp
|
|
lua:/usr/include/lualib.h:/usr/include/lua5.3/lualib.h
|
|
lua:/usr/include/lauxlib.h:/usr/include/lua5.3/lauxlib.h
|
|
lua:lua.pc:/usr/lib/pkgconfig/lua5.3.pc
|
|
lua:liblua.a:/usr/lib/liblua5.3.a
|
|
lua:liblua.so:/usr/lib/liblua5.3.so
|
|
lua:lua:/usr/share/doc/lua5.3
|
|
"
|
|
|
|
do_build() {
|
|
sed -i src/Makefile -r \
|
|
-e '/^LUA_(SO|A|T)=/ s;lua;lua5.3;' \
|
|
-e '/^LUAC_T=/ s;luac;luac5.3;'
|
|
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
|
|
CC="$CC" RANLIB="$RANLIB" \
|
|
INSTALL_DATA="cp -d" LUA_SO=liblua5.3.so ${makejobs} linux
|
|
}
|
|
|
|
do_install() {
|
|
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
|
|
TO_BIN="lua5.3 luac5.3" \
|
|
TO_LIB="liblua5.3.a liblua5.3.so liblua5.3.so.${version%.*} liblua5.3.so.${version}" \
|
|
INSTALL_INC="${DESTDIR}/usr/include/lua5.3" \
|
|
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.3;" \
|
|
-e "s;/include;/include/lua5.3;" \
|
|
> lua5.3.pc
|
|
|
|
vinstall lua5.3.pc 644 usr/lib/pkgconfig
|
|
|
|
# Install the documentation
|
|
rm -f doc/*.1
|
|
vmkdir usr/share/doc/lua5.3
|
|
cp -R doc/* ${DESTDIR}/usr/share/doc/lua5.3
|
|
|
|
vlicense doc/readme.html
|
|
|
|
# Rename man pages
|
|
mv ${DESTDIR}/usr/share/man/man1/lua{,5.3}.1
|
|
mv ${DESTDIR}/usr/share/man/man1/luac{,5.3}.1
|
|
}
|
|
|
|
lua-devel_package() {
|
|
depends="${makedepends} lua>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/share/doc
|
|
}
|
|
}
|