# SliTaz package receipt.

PACKAGE="lua"
VERSION="5.1.4"
CATEGORY="development"
SHORT_DESC="Powerful, fast, light-weight, embeddable scripting language."
DEPENDS="readline ncurses"
BUILD_DEPENDS="readline-dev"
MAINTAINER="pankso@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://www.lua.org/"
WGET_URL="http://www.lua.org/ftp/$TARBALL"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	sed -i "s#prefix= /usr/local#prefix= /usr#" etc/lua.pc
	sed -i "s#/usr/local/#/usr/#" src/luaconf.h
	sed -i s"/-O2/-Os -march=$ARCH/" src/Makefile
	make linux &&
	make install \
		INSTALL_TOP=$DESTDIR/usr \
		INSTALL_MAN=$DESTDIR/usr/share/man/man1
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/bin
	cp -a $install/usr/bin $fs/usr
}