new package: autojump

This commit is contained in:
Tee KOBAYASHI 2022-12-03 09:01:35 +09:00 committed by xtkoba
parent d65d160751
commit 1d8f198a83
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- a/bin/autojump.sh
+++ b/bin/autojump.sh
@@ -21,6 +21,6 @@
source ~/.autojump/share/autojump/autojump.${shell}
# check global install
-elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then
- source /usr/local/share/autojump/autojump.${shell}
+elif [ -s @TERMUX_PREFIX@/share/autojump/autojump.${shell} ]; then
+ source @TERMUX_PREFIX@/share/autojump/autojump.${shell}
fi

View File

@ -0,0 +1,18 @@
TERMUX_PKG_HOMEPAGE=https://github.com/wting/autojump
TERMUX_PKG_DESCRIPTION="A faster way to navigate your filesystem"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=22.5.3
TERMUX_PKG_SRCURL=https://github.com/wting/autojump/archive/refs/tags/release-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=00daf3698e17ac3ac788d529877c03ee80c3790472a85d0ed063ac3a354c37b1
TERMUX_PKG_DEPENDS="python"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make() {
:
}
termux_step_make_install() {
SHELL=/bin/bash ./install.py --system
}

View File

@ -0,0 +1,31 @@
--- a/install.py
+++ b/install.py
@@ -68,8 +68,8 @@
default_user_prefix = ''
default_user_zshshare = 'functions'
default_system_destdir = '/'
- default_system_prefix = '/usr/local'
- default_system_zshshare = '/usr/share/zsh/site-functions'
+ default_system_prefix = '@TERMUX_PREFIX@'
+ default_system_zshshare = '@TERMUX_PREFIX@/share/zsh/site-functions'
default_clink_dir = os.path.join(os.getenv('LOCALAPPDATA', ''), 'clink')
parser = ArgumentParser(
@@ -111,7 +111,7 @@
if sys.version_info[0] == 2 and sys.version_info[1] < 6:
print('Python v2.6+ or v3.0+ required.', file=sys.stderr)
sys.exit(1)
- if args.system:
+ if False:
if platform.system() == 'Windows':
print(
'System-wide installation is not supported on Windows.',
@@ -187,7 +187,7 @@
print('Installing autojump to %s ...' % args.destdir)
bin_dir = os.path.join(args.destdir, args.prefix, 'bin')
- etc_dir = os.path.join(args.destdir, 'etc', 'profile.d')
+ etc_dir = os.path.join(args.destdir, args.prefix, 'etc', 'profile.d')
doc_dir = os.path.join(args.destdir, args.prefix, 'share', 'man', 'man1')
share_dir = os.path.join(args.destdir, args.prefix, 'share', 'autojump')
zshshare_dir = os.path.join(args.destdir, args.zshshare)