wok-6.x annotate zsh/receipt @ rev 12184
get-flash-plugin: Firefox have no more plugins directory
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Mar 25 01:55:25 2012 +0100 (2012-03-25) |
parents | 3d3465b1f28d |
children | 191b99ca9dc2 |
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@1531 | 8 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pascal@1531 | 9 WEB_SITE="http://zsh.sourceforge.net/" |
pascal@1531 | 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
jozee@4978 | 11 TAGS="shell" |
pascal@11771 | 12 BUGS="Does not support build bot: configure: error: no controlling tty\nTry running configure with --with-tcsetpgrp or --without-tcsetpgrp" |
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 { |
pascal@1531 | 20 cd $src |
slaxemulator@10039 | 21 ./configure --bindir=/bin \ |
slaxemulator@10039 | 22 --disable-dynamic --enable-multibyte \ |
pascal@1531 | 23 --enable-fndir=/usr/share/zsh/functions \ |
slaxemulator@10039 | 24 --enable-scriptdir=/usr/share/zsh/scripts \ |
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() |
pascal@1531 | 32 { |
pascal@1531 | 33 cp -a $_pkg/bin $fs |
pascal@1531 | 34 |
pascal@1531 | 35 # Config files. |
pascal@1531 | 36 # |
pascal@1531 | 37 mkdir $fs/etc |
slaxemulator@9723 | 38 cp $stuff/example.zshrc $fs/etc/zshrc |
pascal@1531 | 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@1531 | 42 cp -r $_pkg/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 |
pascal@1531 | 48 # Post install commands for Tazpkg. |
pascal@1531 | 49 # Check /bin/sh stat. |
pascal@1531 | 50 # |
pascal@1531 | 51 post_install() |
pascal@1531 | 52 { |
pascal@1531 | 53 local root |
pascal@1531 | 54 root=$1 |
pascal@1531 | 55 echo "Processing post-install commands..." |
pascal@1531 | 56 sh=`readlink $root/bin/sh` |
pascal@1531 | 57 if [ ! "$sh" = "/bin/zsh" ]; then |
pascal@1531 | 58 echo "" |
pascal@1531 | 59 echo "**** Actual SH link : $sh" |
pascal@1531 | 60 echo "" |
pascal@6073 | 61 echo -n "Do you want Zsh for /bin/sh (y/N) ? : " |
pascal@6073 | 62 read -t 30 answer < /dev/tty |
pascal@6073 | 63 if [ "$answer" == "y" ]; then |
pascal@1531 | 64 echo "" |
pascal@1531 | 65 echo -n "Removin sh link to make a new one pointing on /bin/zsh..." |
pascal@1531 | 66 rm $root/bin/sh && ln -s /bin/zsh $root/bin/sh |
pascal@1531 | 67 status |
pascal@1531 | 68 else |
pascal@1531 | 69 echo "" |
pascal@1531 | 70 echo "Leaving /bin/sh to : $sh" |
pascal@1531 | 71 fi |
pascal@1531 | 72 fi |
pascal@1531 | 73 } |
mojo@11667 | 74 |
mojo@11667 | 75 # Restore a valid sh link if needed. |
mojo@11667 | 76 pre_remove() |
mojo@11667 | 77 { |
mojo@11667 | 78 local root |
mojo@11667 | 79 root=$1 |
mojo@11667 | 80 sh=`readlink $root/bin/sh` |
mojo@11667 | 81 if [ ! "$sh" = "busybox" ]; then |
mojo@11667 | 82 rm $root/bin/sh && |
mojo@11667 | 83 ln -s /bin/busybox $root/bin/sh |
mojo@11667 | 84 fi |
mojo@11667 | 85 } |
mojo@11667 | 86 |