2017-01-18 00:58:39 +01:00
|
|
|
TERMUX_SUBPKG_INCLUDE="bin/ share/man/man1/"
|
|
|
|
TERMUX_SUBPKG_DESCRIPTION="Simple, extensible, embeddable programming language"
|
|
|
|
TERMUX_SUBPKG_DEPENDS="readline"
|
2020-10-01 15:18:08 +02:00
|
|
|
TERMUX_SUBPKG_BREAKS="lua (<< 5.3.5-6)"
|
|
|
|
TERMUX_SUBPKG_REPLACES="lua (<< 5.3.5-6)"
|
2021-12-03 10:46:30 +01:00
|
|
|
|
2021-12-04 03:59:50 +01:00
|
|
|
termux_step_create_subpkg_debscripts() {
|
2021-12-03 10:46:30 +01:00
|
|
|
cat <<- EOF > ./postinst
|
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
|
|
|
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] || [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
|
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --install \
|
|
|
|
$TERMUX_PREFIX/bin/lua lua $TERMUX_PREFIX/bin/lua5.3 130
|
|
|
|
update-alternatives --install \
|
|
|
|
$TERMUX_PREFIX/bin/luac luac $TERMUX_PREFIX/bin/luac5.3 130
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat <<- EOF > ./prerm
|
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
|
|
|
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] || [ "\$1" != "upgrade" ]; then
|
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --remove lua $TERMUX_PREFIX/bin/lua
|
|
|
|
update-alternatives --remove luac $TERMUX_PREFIX/bin/luac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
}
|