mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-28 13:42:37 +00:00
- Need to implement subpackage support in the build step This reverts commit 8cb4e425ad255d058d3ec935736a8fd7d2d29deb. This reverts commit ca93818843c4708e814ce0a5209a4c966a2e520f. This reverts commit bf75438a537679c69a20a6488099e6f7817e369e. This reverts commit bb6c1874609c24c959914de25066a4977ee8d75f.
47 lines
1.5 KiB
Bash
47 lines
1.5 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://www.lua.org
|
|
TERMUX_PKG_DESCRIPTION="Shared library for the Lua interpreter (v5.1.x)"
|
|
TERMUX_PKG_LICENSE="MIT"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
TERMUX_PKG_VERSION=5.1.5
|
|
TERMUX_PKG_REVISION=3
|
|
TERMUX_PKG_SRCURL=https://www.lua.org/ftp/lua-$TERMUX_PKG_VERSION.tar.gz
|
|
TERMUX_PKG_SHA256=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
|
|
TERMUX_PKG_BUILD_DEPENDS="readline"
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
termux_step_pre_configure() {
|
|
CFLAGS+=" -fPIC"
|
|
}
|
|
|
|
termux_step_configure() {
|
|
sed -e "s/%VER%/${TERMUX_PKG_VERSION%.*}/g;s/%REL%/${TERMUX_PKG_VERSION}/g" \
|
|
-e "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|" \
|
|
"$TERMUX_PKG_BUILDER_DIR"/lua.pc.in > lua.pc
|
|
}
|
|
|
|
termux_step_make() {
|
|
make -j $TERMUX_PKG_MAKE_PROCESSES \
|
|
MYCFLAGS="$CFLAGS" \
|
|
MYLDFLAGS="$LDFLAGS" \
|
|
CC="$CC" \
|
|
CXX="$CXX" \
|
|
linux
|
|
}
|
|
|
|
termux_step_make_install() {
|
|
make \
|
|
TO_BIN="lua5.1 luac5.1" \
|
|
TO_LIB="liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.${TERMUX_PKG_VERSION} liblua5.1.a" \
|
|
INSTALL_DATA="cp -d" \
|
|
INSTALL_TOP="$TERMUX_PREFIX" \
|
|
INSTALL_INC="$TERMUX_PREFIX/include/lua5.1" \
|
|
INSTALL_MAN="$TERMUX_PREFIX/share/man/man1" \
|
|
install
|
|
install -Dm600 lua.pc "$TERMUX_PREFIX"/lib/pkgconfig/lua51.pc
|
|
ln -sf lua51.pc "$TERMUX_PREFIX"/lib/pkgconfig/lua5.1.pc
|
|
ln -sf lua51.pc "$TERMUX_PREFIX"/lib/pkgconfig/lua-5.1.pc
|
|
|
|
mv -f "$TERMUX_PREFIX"/share/man/man1/lua.1 "$TERMUX_PREFIX"/share/man/man1/lua5.1.1
|
|
mv -f "$TERMUX_PREFIX"/share/man/man1/luac.1 "$TERMUX_PREFIX"/share/man/man1/luac5.1.1
|
|
}
|