2017-04-10 22:24:50 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://micro-editor.github.io/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Modern and intuitive terminal-based text editor"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="MIT"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2020-07-17 14:17:35 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/zyedidia/micro.git
|
2021-10-05 22:32:12 +02:00
|
|
|
TERMUX_PKG_VERSION=2.0.10
|
2021-10-06 14:50:08 +02:00
|
|
|
TERMUX_PKG_REVISION=1
|
2020-05-07 20:19:08 +02:00
|
|
|
|
2017-04-10 22:24:50 +02:00
|
|
|
termux_step_make() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
|
|
|
termux_setup_golang
|
|
|
|
|
2017-08-11 00:26:18 +02:00
|
|
|
export GOPATH=$TERMUX_PKG_BUILDDIR
|
|
|
|
local MICRO_SRC=$GOPATH/src/github.com/zyedidia/micro
|
2017-04-10 22:24:50 +02:00
|
|
|
|
2017-08-11 00:26:18 +02:00
|
|
|
cd $TERMUX_PKG_SRCDIR
|
|
|
|
mkdir -p $MICRO_SRC
|
|
|
|
cp -R . $MICRO_SRC
|
|
|
|
|
|
|
|
cd $MICRO_SRC
|
|
|
|
make build-quick
|
|
|
|
mv micro $TERMUX_PREFIX/bin/micro
|
2017-04-10 22:24:50 +02:00
|
|
|
}
|
2019-08-10 02:01:45 +02:00
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
2020-09-09 20:42:58 +02:00
|
|
|
cat <<- EOF > ./postinst
|
2019-08-10 02:01:45 +02:00
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
2021-09-10 18:33:36 +02:00
|
|
|
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] || [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
|
2019-08-10 02:01:45 +02:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --install \
|
2019-08-10 21:34:54 +02:00
|
|
|
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/micro 25
|
2019-08-10 02:01:45 +02:00
|
|
|
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
|
2019-08-10 02:01:45 +02:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --remove editor $TERMUX_PREFIX/bin/micro
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
}
|