wok-current view zsh/receipt @ rev 24132
Up tazinst (114)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 23 15:07:33 2021 +0000 (2021-10-23) |
parents | beba30c03091 |
children | 922f061231c2 |
line source
1 # SliTaz package receipt.
3 PACKAGE="zsh"
4 VERSION="5.8"
5 CATEGORY="system-tools"
6 TAGS="shell"
7 SHORT_DESC="Zsh shell incorporates many features of bash, ksh, and tcsh."
8 MAINTAINER="sandys@gmail.com"
9 LICENSE="other"
10 WEB_SITE="https://www.zsh.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="${WEB_SITE}pub/$TARBALL"
15 DEPENDS="gdbm ncurses ncursesw zlib"
16 BUILD_DEPENDS="ncurses-dev zlib-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure \
22 --bindir=/bin \
23 --disable-dynamic \
24 --enable-multibyte \
25 --enable-fndir=/usr/share/zsh/functions \
26 --enable-scriptdir=/usr/share/zsh/scripts \
27 --with-tcsetpgrp \
28 $CONFIGURE_ARGS &&
29 make -j 1 &&
30 make install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir $fs/etc
37 mkdir -p $fs/usr/share/zsh
38 mkdir -p $fs/usr/share/zsh/scripts
40 cp -a $install/bin $fs
42 # Configuration files.
43 cp $stuff/example.zshrc $fs/etc/zshrc
45 #no way around this... gen_package will not automatically copy these
46 cp -r $install/usr/share/zsh/functions \
47 $fs/usr/share/zsh
48 }
50 # Post install commands for Tazpkg.
51 # Check /bin/sh stat.
52 #
53 post_install()
54 {
55 sh=$(readlink "$1/bin/sh")
56 if [ "$sh" != '/bin/zsh' ]
57 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' ]
64 then
65 echo ''
66 action 'Removing sh link to make a new one pointing on /bin/zsh...'
67 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh"
68 status
69 else
70 echo ''
71 echo "Leaving /bin/sh to : $sh"
72 fi
73 fi
74 }
76 # Restore a valid sh link if needed.
77 pre_remove()
78 {
79 sh=$(readlink "$1/bin/sh")
80 [ "$sh" != 'busybox' ] &&
81 ln -sf /bin/busybox "$1/bin/sh"
82 }