wok view zsh/receipt @ rev 18741

Finish to remove redundant messages 'Processing * commands...'; KISS get-msttcorefonts; add get-msttcorefonts2
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Dec 25 15:23:46 2015 +0200 (2015-12-25)
parents 9e01bc6321ea
children 510d209b062d
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.
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 sh=$(readlink "$1/bin/sh")
52 if [ "$sh" != '/bin/zsh' ]; then
53 echo ''
54 echo "**** Actual SH link : $sh"
55 echo ''
56 echo -n 'Do you want Zsh for /bin/sh (y/N) ? : '
57 read -t 30 answer < /dev/tty
58 if [ "$answer" == 'y' ]; then
59 echo ''
60 action 'Removing sh link to make a new one pointing on /bin/zsh...'
61 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh"
62 status
63 else
64 echo ''
65 echo "Leaving /bin/sh to : $sh"
66 fi
67 fi
68 }
70 # Restore a valid sh link if needed.
71 pre_remove()
72 {
73 sh=$(readlink "$1/bin/sh")
74 [ "$sh" != 'busybox' ] && ln -sf /bin/busybox "$1/bin/sh"
75 }