2013-10-10 09:44:13 +00:00
|
|
|
# Template file for 'lua51'
|
|
|
|
pkgname=lua51
|
|
|
|
version=5.1.5
|
2013-10-11 08:45:14 +00:00
|
|
|
revision=2
|
2013-10-10 09:44:13 +00:00
|
|
|
wrksrc="lua-${version}"
|
|
|
|
makedepends="ncurses-devel readline-devel"
|
|
|
|
short_desc="Powerful, fast, lightweight, embeddable scripting language (5.1.x)"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
homepage="http://www.lua.org"
|
|
|
|
license="MIT"
|
|
|
|
distfiles="http://www.lua.org/ftp/lua-$version.tar.gz"
|
|
|
|
checksum=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
|
|
|
|
long_desc="
|
|
|
|
Lua combines simple procedural syntax with powerful data description
|
|
|
|
constructs based on associative arrays and extensible semantics. Lua
|
|
|
|
is dynamically typed, runs by interpreting bytecode for a register-based
|
|
|
|
virtual machine, and has automatic memory management with incremental
|
|
|
|
garbage collection, making it ideal for configuration, scripting, and
|
|
|
|
rapid prototyping."
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
export CFLAGS="$CFLAGS -fPIC"
|
|
|
|
sed -e 's:llua:llua5.1:' -e 's:/include:/include/lua5.1:' -i etc/lua.pc
|
|
|
|
sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' -e '/^LUAC_T=/ s/luac/luac5.1/' -i src/Makefile
|
|
|
|
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
|
|
|
|
CC="$CC" RANLIB="$RANLIB" \
|
|
|
|
INSTALL_DATA="cp -d" LUA_SO=liblua5.1.so ${makejobs} linux
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
|
|
|
|
TO_BIN="lua5.1 luac5.1" \
|
|
|
|
TO_LIB="liblua5.1.a liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.${version}" \
|
|
|
|
INSTALL_INC="${DESTDIR}/usr/include/lua5.1" \
|
|
|
|
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
|
|
|
|
|
|
|
|
install -Dm644 etc/lua.pc ${DESTDIR}/usr/lib/pkgconfig/lua5.1.pc
|
|
|
|
|
|
|
|
# Install the documentation
|
|
|
|
vmkdir usr/share/doc/lua51
|
|
|
|
cp -R doc/* ${DESTDIR}/usr/share/doc/lua51
|
|
|
|
|
|
|
|
ln -s liblua5.1.so ${DESTDIR}/usr/lib/liblua.so.5.1
|
|
|
|
ln -s liblua5.1.so ${DESTDIR}/usr/lib/liblua.so.${version}
|
|
|
|
cd ${DESTDIR}/usr/share/man/man1
|
|
|
|
mv lua.1 lua5.1.1
|
|
|
|
mv luac.1 luac5.1.1
|
2013-10-11 08:45:14 +00:00
|
|
|
rm -f ${DESTDIR}/usr/lib/liblua.so.*
|
2013-10-10 09:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
lua51-devel_package() {
|
|
|
|
depends="ncurses-devel readline-devel lua51>=${version}"
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|