2018-10-16 05:59:57 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/hboetes/mg
|
|
|
|
TERMUX_PKG_DESCRIPTION="microscopic GNU Emacs-style editor"
|
2019-01-21 15:00:12 +01:00
|
|
|
TERMUX_PKG_LICENSE="Public Domain"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-03-03 21:11:05 +01:00
|
|
|
TERMUX_PKG_VERSION=20220212
|
2022-04-02 08:02:19 +02:00
|
|
|
TERMUX_PKG_REVISION=1
|
2018-11-18 00:57:49 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/hboetes/mg/archive/$TERMUX_PKG_VERSION.tar.gz
|
2022-03-03 21:11:05 +01:00
|
|
|
TERMUX_PKG_SHA256=dd94e6c43bf08f35a7342c416c386529c58d756654720f1797c5708ebcd5eb73
|
2021-10-04 12:43:31 +02:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2022-04-01 09:41:46 +02:00
|
|
|
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d{8}"
|
2018-10-16 05:59:57 +02:00
|
|
|
TERMUX_PKG_DEPENDS="libbsd, ncurses"
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2018-11-18 00:57:49 +01:00
|
|
|
|
2022-03-03 21:11:05 +01:00
|
|
|
termux_step_post_get_source() {
|
|
|
|
rm -f CMakeLists.txt
|
|
|
|
}
|
|
|
|
|
2018-10-16 05:59:57 +02:00
|
|
|
termux_step_pre_configure() {
|
2021-11-10 20:37:00 +01:00
|
|
|
CFLAGS+=" $CPPFLAGS -fcommon"
|
2018-10-16 05:59:57 +02:00
|
|
|
}
|
2019-08-10 21:34:54 +02: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
|
2019-08-10 21:34:54 +02:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --install \
|
|
|
|
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/mg 30
|
|
|
|
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 21:34:54 +02:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --remove editor $TERMUX_PREFIX/bin/mg
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
}
|