wok-6.x view zsh/receipt @ rev 18200

Up tazinst (61)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 12 22:00:23 2015 +0200 (2015-07-12)
parents 191b99ca9dc2
children 9e01bc6321ea
line source
1 # SliTaz package receipt.
3 PACKAGE="zsh"
4 VERSION="5.0.7"
5 CATEGORY="system-tools"
6 SHORT_DESC="Zsh shell incorporates many features of bash, ksh, and tcsh"
7 MAINTAINER="sandys@gmail.com"
8 LICENSE="other"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://zsh.sourceforge.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 TAGS="shell"
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 ./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 &&
25 make &&
26 make install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 cp -a $install/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 $install/usr/share/zsh/functions $fs/usr/share/zsh
43 mkdir -p $fs/usr/share/zsh/scripts
44 }
46 # Post install commands for Tazpkg.
47 # Check /bin/sh stat.
48 #
49 post_install()
50 {
51 local root
52 root=$1
53 echo "Processing post-install commands..."
54 sh=`readlink $root/bin/sh`
55 if [ ! "$sh" = "/bin/zsh" ]; then
56 echo ""
57 echo "**** Actual SH link : $sh"
58 echo ""
59 echo -n "Do you want Zsh for /bin/sh (y/N) ? : "
60 read -t 30 answer < /dev/tty
61 if [ "$answer" == "y" ]; then
62 echo ""
63 echo -n "Removin sh link to make a new one pointing on /bin/zsh..."
64 rm $root/bin/sh && ln -s /bin/zsh $root/bin/sh
65 status
66 else
67 echo ""
68 echo "Leaving /bin/sh to : $sh"
69 fi
70 fi
71 }
73 # Restore a valid sh link if needed.
74 pre_remove()
75 {
76 local root
77 root=$1
78 sh=`readlink $root/bin/sh`
79 if [ ! "$sh" = "busybox" ]; then
80 rm $root/bin/sh &&
81 ln -s /bin/busybox $root/bin/sh
82 fi
83 }