wok annotate zsh/receipt @ rev 19643
linld: fix cpuhaslm (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jan 21 12:01:33 2017 +0100 (2017-01-21) |
parents | 6fab3264ba87 |
children | 02c70d036ea0 |
rev | line source |
---|---|
pascal@1531 | 1 # SliTaz package receipt. |
pascal@1531 | 2 |
pascal@1531 | 3 PACKAGE="zsh" |
pascal@18104 | 4 VERSION="5.0.7" |
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@1531 | 13 |
slaxemulator@11123 | 14 DEPENDS="ncurses zlib ncursesw" |
slaxemulator@11123 | 15 BUILD_DEPENDS="ncurses-dev zlib-dev" |
slaxemulator@11123 | 16 |
pascal@1531 | 17 # Rules to configure and make the package. |
pascal@1531 | 18 compile_rules() |
pascal@1531 | 19 { |
slaxemulator@10039 | 20 ./configure --bindir=/bin \ |
pascal@18744 | 21 --disable-dynamic --enable-multibyte \ |
pascal@18744 | 22 --enable-fndir=/usr/share/zsh/functions \ |
pascal@18744 | 23 --enable-scriptdir=/usr/share/zsh/scripts \ |
pascal@18744 | 24 --with-tcsetpgrp \ |
pascal@11771 | 25 $CONFIGURE_ARGS && |
pascal@1531 | 26 make && |
slaxemulator@9723 | 27 make install |
pascal@1531 | 28 } |
pascal@1531 | 29 |
pascal@1531 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1531 | 31 genpkg_rules() |
al@18741 | 32 { |
pascal@15361 | 33 cp -a $install/bin $fs |
pascal@1531 | 34 |
pascal@1531 | 35 # Config files. |
al@18741 | 36 |
pascal@1531 | 37 mkdir $fs/etc |
slaxemulator@9723 | 38 cp $stuff/example.zshrc $fs/etc/zshrc |
al@18741 | 39 |
pascal@1531 | 40 #no way around this... gen_package will not automatically copy these |
pascal@1531 | 41 mkdir -p $fs/usr/share/zsh |
pascal@15361 | 42 cp -r $install/usr/share/zsh/functions $fs/usr/share/zsh |
pascal@1531 | 43 |
pascal@1531 | 44 mkdir -p $fs/usr/share/zsh/scripts |
pascal@1531 | 45 } |
pascal@1531 | 46 |
pascal@1531 | 47 # Post install commands for Tazpkg. |
pascal@1531 | 48 # Check /bin/sh stat. |
pascal@1531 | 49 # |
pascal@1531 | 50 post_install() |
pascal@1531 | 51 { |
pascal@18730 | 52 sh=$(readlink "$1/bin/sh") |
al@18741 | 53 if [ "$sh" != '/bin/zsh' ]; then |
al@18741 | 54 echo '' |
pascal@1531 | 55 echo "**** Actual SH link : $sh" |
al@18741 | 56 echo '' |
al@18741 | 57 echo -n 'Do you want Zsh for /bin/sh (y/N) ? : ' |
pascal@6073 | 58 read -t 30 answer < /dev/tty |
al@18741 | 59 if [ "$answer" == 'y' ]; then |
al@18741 | 60 echo '' |
al@18741 | 61 action 'Removing sh link to make a new one pointing on /bin/zsh...' |
pascal@18730 | 62 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh" |
pascal@1531 | 63 status |
pascal@1531 | 64 else |
al@18741 | 65 echo '' |
pascal@1531 | 66 echo "Leaving /bin/sh to : $sh" |
pascal@1531 | 67 fi |
pascal@1531 | 68 fi |
pascal@1531 | 69 } |
mojo@11667 | 70 |
mojo@11667 | 71 # Restore a valid sh link if needed. |
mojo@11667 | 72 pre_remove() |
mojo@11667 | 73 { |
al@18741 | 74 sh=$(readlink "$1/bin/sh") |
al@18741 | 75 [ "$sh" != 'busybox' ] && ln -sf /bin/busybox "$1/bin/sh" |
mojo@11667 | 76 } |