wok view zsh/receipt @ rev 20346

npth update: 1.2 (2015 April) -> 1.5 (2017 June)
author Erkan Yilmaz <erkan@slitaz.org>
date Sat Jun 09 10:34:39 2018 +0000 (2018-06-09)
parents 6fab3264ba87
children 02c70d036ea0
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 --with-tcsetpgrp \
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 $install/bin $fs
35 # Config files.
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 $install/usr/share/zsh/functions $fs/usr/share/zsh
44 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 sh=$(readlink "$1/bin/sh")
53 if [ "$sh" != '/bin/zsh' ]; then
54 echo ''
55 echo "**** Actual SH link : $sh"
56 echo ''
57 echo -n 'Do you want Zsh for /bin/sh (y/N) ? : '
58 read -t 30 answer < /dev/tty
59 if [ "$answer" == 'y' ]; then
60 echo ''
61 action 'Removing sh link to make a new one pointing on /bin/zsh...'
62 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh"
63 status
64 else
65 echo ''
66 echo "Leaving /bin/sh to : $sh"
67 fi
68 fi
69 }
71 # Restore a valid sh link if needed.
72 pre_remove()
73 {
74 sh=$(readlink "$1/bin/sh")
75 [ "$sh" != 'busybox' ] && ln -sf /bin/busybox "$1/bin/sh"
76 }