2020-03-20 10:34:34 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.brain-dump.org/projects/vis/
|
2019-09-08 15:04:48 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Modern, legacy free, simple yet efficient vim-like editor"
|
|
|
|
TERMUX_PKG_LICENSE="ISC"
|
2020-05-13 10:01:25 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
2021-06-25 08:58:47 +02:00
|
|
|
TERMUX_PKG_VERSION=0.7
|
2019-09-08 15:04:48 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/martanne/vis/archive/v$TERMUX_PKG_VERSION.tar.gz
|
2021-06-25 08:58:47 +02:00
|
|
|
TERMUX_PKG_SHA256=359ebb12a986b2f4e2a945567ad7587eb7d354301a5050ce10d51544570635eb
|
2020-10-01 15:18:27 +02:00
|
|
|
TERMUX_PKG_DEPENDS="liblua53, libtermkey, lua-lpeg, ncurses"
|
2019-09-08 15:04:48 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2020-10-01 15:18:27 +02:00
|
|
|
|
|
|
|
termux_step_pre_configure() {
|
2021-06-25 08:58:47 +02:00
|
|
|
CFLAGS+=" -I$TERMUX_PREFIX/include -I$TERMUX_PREFIX/include/lua5.3"
|
2020-10-01 15:18:27 +02:00
|
|
|
}
|
2020-12-18 18:29:02 +01:00
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
|
|
|
cat <<- EOF > ./postinst
|
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
2021-09-10 18:33:36 +02:00
|
|
|
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] || [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
|
2020-12-18 18:29:02 +01:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --install \
|
|
|
|
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/vis 30
|
|
|
|
update-alternatives --install \
|
|
|
|
$TERMUX_PREFIX/bin/vi vi $TERMUX_PREFIX/bin/vis 10
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat <<- EOF > ./prerm
|
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
2021-09-10 18:33:36 +02:00
|
|
|
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] || [ "\$1" != "upgrade" ]; then
|
2020-12-18 18:29:02 +01:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --remove editor $TERMUX_PREFIX/bin/vis
|
|
|
|
update-alternatives --remove vi $TERMUX_PREFIX/bin/vis
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
}
|