Browse Source

alternatives: more editors can be used as alternative for /bin/editor

emacs-27
Leonid Plyushch 5 years ago
parent
commit
d5dfcc89c6
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 25
      packages/emacs/build.sh
  2. 25
      packages/joe/build.sh
  3. 25
      packages/jupp/build.sh
  4. 24
      packages/kakoune/build.sh
  5. 24
      packages/mg/build.sh
  6. 4
      packages/micro/build.sh
  7. 24
      packages/ne/build.sh
  8. 4
      packages/vim-python/build.sh
  9. 4
      packages/vim/build.sh
  10. 23
      packages/zile/build.sh

25
packages/emacs/build.sh

@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/emacs/
TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=26.2
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=151ce69dbe5b809d4492ffae4a4b153b2778459de6deb26f35691e1281a9c58e
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=151ce69dbe5b809d4492ffae4a4b153b2778459de6deb26f35691e1281a9c58e
TERMUX_PKG_DEPENDS="ncurses, gnutls, libxml2"
TERMUX_PKG_BREAKS="emacs-dev"
TERMUX_PKG_REPLACES="emacs-dev"
@ -84,3 +84,24 @@ termux_step_post_configure() {
termux_step_post_make_install() {
cp $TERMUX_PKG_BUILDER_DIR/site-init.el $TERMUX_PREFIX/share/emacs/${TERMUX_PKG_VERSION}/lisp/emacs-lisp/
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/emacs 40
fi
fi
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/emacs
fi
fi
EOF
}

25
packages/joe/build.sh

@ -4,7 +4,28 @@ TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_DEPENDS="ncurses"
TERMUX_PKG_CONFLICTS="jupp"
TERMUX_PKG_VERSION=4.6
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://sourceforge.net/projects/joe-editor/files/JOE%20sources/joe-${TERMUX_PKG_VERSION}/joe-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-termcap"
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/joe 10
fi
fi
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/joe
fi
fi
EOF
}

25
packages/jupp/build.sh

@ -5,9 +5,9 @@ TERMUX_PKG_MAINTAINER="Dominik George @Natureshadow"
TERMUX_PKG_DEPENDS="ncurses"
TERMUX_PKG_CONFLICTS="joe"
TERMUX_PKG_VERSION=3.1jupp38
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=c5cbe3f97683f6e513f611a60531feefb9b877f8cea4c6e9087b48631f69ed40
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://www.mirbsd.org/MirOS/dist/jupp/joe-${TERMUX_PKG_VERSION}.tgz
TERMUX_PKG_SHA256=c5cbe3f97683f6e513f611a60531feefb9b877f8cea4c6e9087b48631f69ed40
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-dependency-tracking
--disable-getpwnam
@ -19,3 +19,24 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
termux_step_post_extract_package() {
chmod +x $TERMUX_PKG_SRCDIR/configure
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/jupp 10
fi
fi
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/jupp
fi
fi
EOF
}

24
packages/kakoune/build.sh

@ -2,8 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/mawww/kakoune
TERMUX_PKG_DESCRIPTION="Code editor heavily inspired by Vim"
TERMUX_PKG_LICENSE="Unlicense"
TERMUX_PKG_VERSION=2019.07.01
TERMUX_PKG_SHA256=8cf978499000bd71a78736eaee5663bd996f53c4e610c62a9bd97502a3ed6fd3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/mawww/kakoune/releases/download/v$TERMUX_PKG_VERSION/kakoune-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_SHA256=8cf978499000bd71a78736eaee5663bd996f53c4e610c62a9bd97502a3ed6fd3
TERMUX_PKG_DEPENDS="libc++, ncurses"
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_EXTRA_MAKE_ARGS=" -C src debug=no"
@ -13,3 +14,24 @@ termux_step_pre_configure() {
CXXFLAGS+=" -no-integrated-as"
fi
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/kak 45
fi
fi
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/kak
fi
fi
EOF
}

24
packages/mg/build.sh

@ -2,8 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/hboetes/mg
TERMUX_PKG_DESCRIPTION="microscopic GNU Emacs-style editor"
TERMUX_PKG_LICENSE="Public Domain"
TERMUX_PKG_VERSION=20180927
TERMUX_PKG_SHA256=fbb09729ea00fe42dcdbc96ac7fc1d2b89eac651dec49e4e7af52fad4f5788f6
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/hboetes/mg/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=fbb09729ea00fe42dcdbc96ac7fc1d2b89eac651dec49e4e7af52fad4f5788f6
TERMUX_PKG_DEPENDS="libbsd, ncurses"
TERMUX_PKG_BUILD_IN_SRC=yes
@ -14,3 +15,24 @@ termux_step_pre_configure() {
termux_step_make_install() {
make prefix=$PREFIX install
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
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
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/mg
fi
fi
EOF
}

4
packages/micro/build.sh

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://micro-editor.github.io/
TERMUX_PKG_DESCRIPTION="Modern and intuitive terminal-based text editor"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=1.4.1
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/zyedidia/micro/releases/download/v${TERMUX_PKG_VERSION}/micro-${TERMUX_PKG_VERSION}-src.tar.gz
TERMUX_PKG_SHA256=0b516826226cf1ddf2fbb274f049cab456a5c162efe3d648f0871564fadcf812
@ -31,7 +31,7 @@ termux_step_create_debscripts() {
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/micro 30
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/micro 25
fi
fi
EOF

24
packages/ne/build.sh

@ -3,8 +3,9 @@ TERMUX_PKG_DESCRIPTION="Easy-to-use and powerful text editor"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="David Martínez @vaites"
TERMUX_PKG_VERSION=3.1.2
TERMUX_PKG_SHA256=31710ce07d6134355f311b249dcd0a8c99c0075b377bbb78a99ee1338d00c6a3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/ne-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=31710ce07d6134355f311b249dcd0a8c99c0075b377bbb78a99ee1338d00c6a3
TERMUX_PKG_DEPENDS="libandroid-support, ncurses"
TERMUX_PKG_RM_AFTER_INSTALL="info/"
TERMUX_PKG_BUILD_IN_SRC=yes
@ -12,3 +13,24 @@ TERMUX_PKG_BUILD_IN_SRC=yes
termux_step_pre_configure() {
export OPTS="$CFLAGS $CPPFLAGS"
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/ne 15
fi
fi
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/ne
fi
fi
EOF
}

4
packages/vim-python/build.sh

@ -6,7 +6,7 @@ TERMUX_PKG_RECOMMENDS="diffutils"
# vim should only be updated every 50 releases on multiples of 50.
# Update both vim and vim-python to the same version in one PR.
TERMUX_PKG_VERSION=8.1.1800
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=dbb55d75b604a51d2a05b25e023d45e9e3f88da73c790960f7dfd93949a5f534
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
@ -83,7 +83,7 @@ termux_step_create_debscripts() {
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/vim 25
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/vim 50
fi
fi
EOF

4
packages/vim/build.sh

@ -6,7 +6,7 @@ TERMUX_PKG_RECOMMENDS="diffutils"
# vim should only be updated every 50 releases on multiples of 50.
# Update both vim and vim-python to the same version in one PR.
TERMUX_PKG_VERSION=8.1.1800
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=dbb55d75b604a51d2a05b25e023d45e9e3f88da73c790960f7dfd93949a5f534
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
@ -70,7 +70,7 @@ termux_step_create_debscripts() {
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/vim 25
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/vim 50
fi
fi
EOF

23
packages/zile/build.sh

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Lightweight clone of the Emacs text editor"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="Iain Nicol @iainnicol"
TERMUX_PKG_VERSION=2.4.14
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/zile/zile-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7a78742795ca32480f2bab697fd5e328618d9997d6f417cf1b14e9da9af26b74
TERMUX_PKG_DEPENDS="libgc, ncurses"
@ -15,3 +15,24 @@ termux_step_post_configure() {
cp $TERMUX_PKG_BUILDER_DIR/zile.1 $TERMUX_PKG_BUILDDIR/doc/zile.1
touch -d "next hour" $TERMUX_PKG_BUILDDIR/doc/zile.1*
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/zile 35
fi
fi
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/zile
fi
fi
EOF
}

Loading…
Cancel
Save