termux-packages/packages/liblua/build.sh
Leonid Pliushch c352216c63 packages: standardize values of several control variables for build.sh
Variables

 TERMUX_PKG_PLATFORM_INDEPENDENT
 TERMUX_DEBUG
 TERMUX_PKG_HAS_DEBUG
 TERMUX_PKG_ESSENTIAL
 TERMUX_SUBPKG_ESSENTIAL
 TERMUX_PKG_NO_STATICSPLIT
 TERMUX_PKG_BUILD_IN_SRC
 TERMUX_PKG_FORCE_CMAKE
 TERMUX_PKG_HOSTBUILD

should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.

build-package.sh should make decision based on variable's value but not on
whether it is set or empty.

%ci:no-build
2019-08-12 18:49:13 +03:00

30 lines
876 B
Bash

TERMUX_PKG_HOMEPAGE=https://www.lua.org/
TERMUX_PKG_DESCRIPTION="Shared library for the Lua interpreter"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=5.3.5
TERMUX_PKG_REVISION=4
TERMUX_PKG_SHA256=0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
TERMUX_PKG_SRCURL=https://www.lua.org/ftp/lua-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_EXTRA_MAKE_ARGS=linux
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_BREAKS="liblua-dev"
TERMUX_PKG_REPLACES="liblua-dev"
TERMUX_PKG_BUILD_DEPENDS="readline"
termux_step_pre_configure() {
AR+=" rcu"
CFLAGS+=" -fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_UNPACK"
export MYLDFLAGS=$LDFLAGS
}
termux_step_post_make_install() {
# Add a pkg-config file for the system zlib
cat > "$PKG_CONFIG_LIBDIR/lua.pc" <<-HERE
Name: Lua
Description: An Extensible Extension Language
Version: $TERMUX_PKG_VERSION
Requires:
Libs: -llua -lm
HERE
}