Commit | Line | Data |
---|---|---|
8927f8fb | 1 | TERMUX_PKG_HOMEPAGE=https://www.zsh.org |
b4d91635 FF |
2 | TERMUX_PKG_DESCRIPTION="Shell with lots of features" |
3 | _FOLDERVERSION=5.3 | |
4 | TERMUX_PKG_VERSION=${_FOLDERVERSION}.1 | |
b4b0cc18 | 5 | TERMUX_PKG_REVISION=3 |
8927f8fb | 6 | TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/zsh/zsh/$_FOLDERVERSION/zsh-${_FOLDERVERSION}.tar.xz |
b4d91635 | 7 | TERMUX_PKG_SHA256=76f82cfd5ce373cf799a03b6f395283f128430db49202e3e3f512fb5a19d6f8a |
fe66968b | 8 | TERMUX_PKG_RM_AFTER_INSTALL="bin/zsh-${_FOLDERVERSION}" |
3cc4ef71 | 9 | TERMUX_PKG_DEPENDS="libandroid-support, ncurses, termux-tools, command-not-found" |
59f0d218 | 10 | TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-etcdir=$TERMUX_PREFIX/etc --disable-gdbm --disable-pcre ac_cv_header_utmp_h=no" |
9fc0086f | 11 | TERMUX_PKG_CONFFILES="etc/zshrc" |
77a8de76 FF |
12 | |
13 | # Below needed to force dynamically loaded binary modules, but does not currently work: | |
2ba1fa72 | 14 | # TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" zsh_cv_shared_environ=yes" |
3cc4ef71 | 15 | |
77a8de76 FF |
16 | termux_step_post_configure () { |
17 | # INSTALL file: "For a non-dynamic zsh, the default is to compile the complete, compctl, zle, | |
18 | # computil, complist, sched, # parameter, zleparameter and rlimits modules into the shell, | |
19 | # and you will need to edit config.modules to make any other modules available." | |
20 | # Since we build zsh non-dynamically (since dynamic loading doesn't work on Android when enabled), | |
21 | # we need to explicitly enable the additional modules we want. | |
9fc0086f | 22 | # - The files module is needed by `compinstall` (https://github.com/termux/termux-packages/issues/61). |
0b5eaee9 | 23 | # - The regex module seems to be used by several extensions. |
9fc0086f | 24 | # - The curses, socket and zprof modules was desired by BrainDamage on IRC (#termux). |
4d8dd314 | 25 | # - The deltochar and mathfunc modules is used by grml-zshrc (https://github.com/termux/termux-packages/issues/494). |
fee97603 | 26 | # - The system module is needed by zplug (https://github.com/termux/termux-packages/issues/659). |
9d488d62 FF |
27 | # - The zpty is needed by zsh-async (https://github.com/termux/termux-packages/issues/672). |
28 | for module in files regex curses zprof socket system deltochar mathfunc zpty; do | |
9fc0086f FF |
29 | perl -p -i -e "s|${module}.mdd link=no|${module}.mdd link=static|" $TERMUX_PKG_BUILDDIR/config.modules |
30 | done | |
77a8de76 FF |
31 | } |
32 | ||
3cc4ef71 FF |
33 | termux_step_post_make_install () { |
34 | # /etc/zshrc - Run for interactive shells (http://zsh.sourceforge.net/Guide/zshguide02.html): | |
35 | sed "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|" $TERMUX_PKG_BUILDER_DIR/etc-zshrc > $TERMUX_PREFIX/etc/zshrc | |
4eb87e93 FF |
36 | |
37 | # Remove zsh.new/zsh.old/zsh-$version if any exists: | |
38 | rm -f $TERMUX_PREFIX/{zsh-*,zsh.*} | |
e46c5cbc FF |
39 | |
40 | # This should perhaps be done in a more general way? Doing it here | |
41 | # to silence "compaudit" warnings: | |
fe66968b | 42 | chmod 700 $TERMUX_PREFIX/share/{zsh,zsh/$_FOLDERVERSION} |
e46c5cbc FF |
43 | } |
44 | ||
45 | termux_step_create_debscripts () { | |
46 | # For already installed packages: | |
aa605e89 | 47 | echo "#!$TERMUX_PREFIX/bin/sh" > postinst |
48 | echo "chmod 700 $TERMUX_PREFIX/share/zsh" >> postinst | |
4d8dd314 FF |
49 | echo "exit 0" >> postinst |
50 | chmod 0755 postinst | |
3cc4ef71 | 51 | } |