wok annotate zsh/receipt @ rev 17315

Up: tazweb (1.10)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Nov 03 00:55:32 2014 +0200 (2014-11-03)
parents a6bab8cd726e
children fcb16f737698
rev   line source
pascal@1531 1 # SliTaz package receipt.
pascal@1531 2
pascal@1531 3 PACKAGE="zsh"
samuel_trassare@11767 4 VERSION="4.3.15"
pascal@1531 5 CATEGORY="system-tools"
pascal@1531 6 SHORT_DESC="Zsh shell incorporates many features of bash, ksh, and tcsh"
pascal@1531 7 MAINTAINER="sandys@gmail.com"
pascal@15361 8 LICENSE="other"
pascal@1531 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@1531 10 WEB_SITE="http://zsh.sourceforge.net/"
pascal@1531 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
jozee@4978 12 TAGS="shell"
pascal@11771 13 BUGS="Does not support build bot: configure: error: no controlling tty\nTry running configure with --with-tcsetpgrp or --without-tcsetpgrp"
pascal@1531 14
slaxemulator@11123 15 DEPENDS="ncurses zlib ncursesw"
slaxemulator@11123 16 BUILD_DEPENDS="ncurses-dev zlib-dev"
slaxemulator@11123 17
pascal@1531 18 # Rules to configure and make the package.
pascal@1531 19 compile_rules()
pascal@1531 20 {
pascal@1531 21 cd $src
slaxemulator@10039 22 ./configure --bindir=/bin \
slaxemulator@10039 23 --disable-dynamic --enable-multibyte \
pascal@1531 24 --enable-fndir=/usr/share/zsh/functions \
slaxemulator@10039 25 --enable-scriptdir=/usr/share/zsh/scripts \
pascal@11771 26 $CONFIGURE_ARGS &&
pascal@1531 27 make &&
slaxemulator@9723 28 make install
pascal@1531 29 }
pascal@1531 30
pascal@1531 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1531 32 genpkg_rules()
pascal@1531 33 {
pascal@15361 34 cp -a $install/bin $fs
pascal@1531 35
pascal@1531 36 # Config files.
pascal@1531 37 #
pascal@1531 38 mkdir $fs/etc
slaxemulator@9723 39 cp $stuff/example.zshrc $fs/etc/zshrc
pascal@1531 40
pascal@1531 41 #no way around this... gen_package will not automatically copy these
pascal@1531 42 mkdir -p $fs/usr/share/zsh
pascal@15361 43 cp -r $install/usr/share/zsh/functions $fs/usr/share/zsh
pascal@1531 44
pascal@1531 45 mkdir -p $fs/usr/share/zsh/scripts
pascal@1531 46
pascal@1531 47 }
pascal@1531 48
pascal@1531 49 # Post install commands for Tazpkg.
pascal@1531 50 # Check /bin/sh stat.
pascal@1531 51 #
pascal@1531 52 post_install()
pascal@1531 53 {
pascal@1531 54 local root
pascal@1531 55 root=$1
pascal@1531 56 echo "Processing post-install commands..."
pascal@1531 57 sh=`readlink $root/bin/sh`
pascal@1531 58 if [ ! "$sh" = "/bin/zsh" ]; then
pascal@1531 59 echo ""
pascal@1531 60 echo "**** Actual SH link : $sh"
pascal@1531 61 echo ""
pascal@6073 62 echo -n "Do you want Zsh for /bin/sh (y/N) ? : "
pascal@6073 63 read -t 30 answer < /dev/tty
pascal@6073 64 if [ "$answer" == "y" ]; then
pascal@1531 65 echo ""
pascal@1531 66 echo -n "Removin sh link to make a new one pointing on /bin/zsh..."
pascal@1531 67 rm $root/bin/sh && ln -s /bin/zsh $root/bin/sh
pascal@1531 68 status
pascal@1531 69 else
pascal@1531 70 echo ""
pascal@1531 71 echo "Leaving /bin/sh to : $sh"
pascal@1531 72 fi
pascal@1531 73 fi
pascal@1531 74 }
mojo@11667 75
mojo@11667 76 # Restore a valid sh link if needed.
mojo@11667 77 pre_remove()
mojo@11667 78 {
mojo@11667 79 local root
mojo@11667 80 root=$1
mojo@11667 81 sh=`readlink $root/bin/sh`
mojo@11667 82 if [ ! "$sh" = "busybox" ]; then
mojo@11667 83 rm $root/bin/sh &&
mojo@11667 84 ln -s /bin/busybox $root/bin/sh
mojo@11667 85 fi
mojo@11667 86 }
mojo@11667 87