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