2016-11-11 01:39:54 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.nano-editor.org/
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Small, free and friendly text editor"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2021-10-06 19:26:17 +02:00
|
|
|
TERMUX_PKG_VERSION=5.9
|
2018-09-11 00:45:49 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://nano-editor.org/dist/latest/nano-$TERMUX_PKG_VERSION.tar.xz
|
2021-10-06 19:26:17 +02:00
|
|
|
TERMUX_PKG_SHA256=757db8cda4bb2873599e47783af463e3b547a627b0cabb30ea7bf71fb4c24937
|
2016-09-23 04:37:42 +02:00
|
|
|
TERMUX_PKG_DEPENDS="libandroid-support, libandroid-glob, ncurses"
|
2017-04-02 12:38:29 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
2018-01-05 22:57:31 +01:00
|
|
|
ac_cv_header_pwd_h=no
|
2017-04-02 12:38:29 +02:00
|
|
|
--disable-libmagic
|
|
|
|
--enable-utf8
|
|
|
|
--with-wordbounds
|
|
|
|
"
|
2019-02-12 23:33:47 +01:00
|
|
|
TERMUX_PKG_CONFFILES="etc/nanorc"
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_RM_AFTER_INSTALL="bin/rnano share/man/man1/rnano.1 share/nano/man-html"
|
|
|
|
|
2016-09-03 23:48:41 +02:00
|
|
|
termux_step_pre_configure() {
|
|
|
|
LDFLAGS+=" -landroid-glob"
|
|
|
|
}
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_post_make_install() {
|
2015-06-13 01:03:31 +02:00
|
|
|
# Configure nano to use syntax highlighting:
|
|
|
|
NANORC=$TERMUX_PREFIX/etc/nanorc
|
|
|
|
echo include \"$TERMUX_PREFIX/share/nano/\*nanorc\" > $NANORC
|
|
|
|
}
|
2019-08-10 01:55:04 +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 01:55:04 +02:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --install \
|
|
|
|
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/nano 20
|
|
|
|
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 01:55:04 +02:00
|
|
|
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
|
|
|
|
update-alternatives --remove editor $TERMUX_PREFIX/bin/nano
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
}
|