wok view zsh/receipt @ rev 11797

ppp: build rp-pppoe.so
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 25 10:42:24 2012 +0100 (2012-02-25)
parents 3d3465b1f28d
children 191b99ca9dc2
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"
12 BUGS="Does not support build bot: configure: error: no controlling tty\nTry running configure with --with-tcsetpgrp or --without-tcsetpgrp"
14 DEPENDS="ncurses zlib ncursesw"
15 BUILD_DEPENDS="ncurses-dev zlib-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure --bindir=/bin \
22 --disable-dynamic --enable-multibyte \
23 --enable-fndir=/usr/share/zsh/functions \
24 --enable-scriptdir=/usr/share/zsh/scripts \
25 $CONFIGURE_ARGS &&
26 make &&
27 make install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 cp -a $_pkg/bin $fs
35 # Config files.
36 #
37 mkdir $fs/etc
38 cp $stuff/example.zshrc $fs/etc/zshrc
40 #no way around this... gen_package will not automatically copy these
41 mkdir -p $fs/usr/share/zsh
42 cp -r $_pkg/usr/share/zsh/functions $fs/usr/share/zsh
44 mkdir -p $fs/usr/share/zsh/scripts
46 }
48 # Post install commands for Tazpkg.
49 # Check /bin/sh stat.
50 #
51 post_install()
52 {
53 local root
54 root=$1
55 echo "Processing post-install commands..."
56 sh=`readlink $root/bin/sh`
57 if [ ! "$sh" = "/bin/zsh" ]; then
58 echo ""
59 echo "**** Actual SH link : $sh"
60 echo ""
61 echo -n "Do you want Zsh for /bin/sh (y/N) ? : "
62 read -t 30 answer < /dev/tty
63 if [ "$answer" == "y" ]; then
64 echo ""
65 echo -n "Removin sh link to make a new one pointing on /bin/zsh..."
66 rm $root/bin/sh && ln -s /bin/zsh $root/bin/sh
67 status
68 else
69 echo ""
70 echo "Leaving /bin/sh to : $sh"
71 fi
72 fi
73 }
75 # Restore a valid sh link if needed.
76 pre_remove()
77 {
78 local root
79 root=$1
80 sh=`readlink $root/bin/sh`
81 if [ ! "$sh" = "busybox" ]; then
82 rm $root/bin/sh &&
83 ln -s /bin/busybox $root/bin/sh
84 fi
85 }