wok-4.x view zsh/receipt @ rev 11770
zsh: give a tty to configure
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 23 08:52:18 2012 +0100 (2012-02-23) |
parents | 605079172258 |
children | a6bab8cd726e |
line source
1 # SliTaz package receipt.
3 PACKAGE="zsh"
4 VERSION="4.3.15"
5 CATEGORY="system-tools"
6 SHORT_DESC="Zsh shell incorporates many features of bash, ksh, and tcsh"
7 MAINTAINER="sandys@gmail.com"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 WEB_SITE="http://zsh.sourceforge.net/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
11 TAGS="shell"
13 DEPENDS="ncurses zlib ncursesw"
14 BUILD_DEPENDS="ncurses-dev zlib-dev"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --bindir=/bin \
21 --disable-dynamic --enable-multibyte \
22 --enable-fndir=/usr/share/zsh/functions \
23 --enable-scriptdir=/usr/share/zsh/scripts \
24 $CONFIGURE_ARGS < /dev/tty0 &&
25 make &&
26 make install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 cp -a $_pkg/bin $fs
34 # Config files.
35 #
36 mkdir $fs/etc
37 cp $stuff/example.zshrc $fs/etc/zshrc
39 #no way around this... gen_package will not automatically copy these
40 mkdir -p $fs/usr/share/zsh
41 cp -r $_pkg/usr/share/zsh/functions $fs/usr/share/zsh
43 mkdir -p $fs/usr/share/zsh/scripts
45 }
47 # Post install commands for Tazpkg.
48 # Check /bin/sh stat.
49 #
50 post_install()
51 {
52 local root
53 root=$1
54 echo "Processing post-install commands..."
55 sh=`readlink $root/bin/sh`
56 if [ ! "$sh" = "/bin/zsh" ]; then
57 echo ""
58 echo "**** Actual SH link : $sh"
59 echo ""
60 echo -n "Do you want Zsh for /bin/sh (y/N) ? : "
61 read -t 30 answer < /dev/tty
62 if [ "$answer" == "y" ]; then
63 echo ""
64 echo -n "Removin sh link to make a new one pointing on /bin/zsh..."
65 rm $root/bin/sh && ln -s /bin/zsh $root/bin/sh
66 status
67 else
68 echo ""
69 echo "Leaving /bin/sh to : $sh"
70 fi
71 fi
72 }
74 # Restore a valid sh link if needed.
75 pre_remove()
76 {
77 local root
78 root=$1
79 sh=`readlink $root/bin/sh`
80 if [ ! "$sh" = "busybox" ]; then
81 rm $root/bin/sh &&
82 ln -s /bin/busybox $root/bin/sh
83 fi
84 }