SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "lua"

# SliTaz package receipt.

PACKAGE="lua"
VERSION="5.2.4"
CATEGORY="development"
SHORT_DESC="Powerful, fast, light-weight, embeddable scripting language."
MAINTAINER="pankso@slitaz.org"
LICENSE="MIT"
WEB_SITE="https://www.lua.org/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://www.lua.org/ftp/$TARBALL"

DEPENDS="libtic ncurses readline"
BUILD_DEPENDS="libtic ncurses-dev readline-dev"

HOST_ARCH="i486 arm"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/*} 2>/dev/null | \
    sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i "s#/usr/local/#/usr/#" src/luaconf.h

    case "$ARCH" in
        arm)
            make CC=${HOST_SYSTEM}-gcc posix ;;
        i486)
            sed -i s"/-O2/-Os -march=$ARCH/" src/Makefile
            make linux MYLIBS=/lib/libtic.so ;;
    esac &&

    # lua.pc
    make pc > lua.pc &&
    sed -i "s#/local##g" lua.pc &&
    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
}

testsuite()
{
    readelf -h $install/usr/bin/lua
}
6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)