wok-current view zsh/receipt @ rev 25109

Up perl-date-manip (6.88)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jun 25 09:21:55 2022 +0000 (2022-06-25)
parents 94dd3813f40d
children
line source
1 # SliTaz package receipt.
3 PACKAGE="zsh"
4 VERSION="5.8.1"
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/old/$TARBALL"
15 DEPENDS="gdbm ncurses ncursesw zlib"
16 BUILD_DEPENDS="ncurses-dev zlib-dev"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - ${WGET_URL%/*} 2>/dev/null | \
22 sed "/$PACKAGE-/!d;s|.*$PACKAGE-||;s|.tar.*||" | tail -n1
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 ./configure \
29 --bindir=/bin \
30 --disable-dynamic \
31 --enable-multibyte \
32 --enable-fndir=/usr/share/zsh/functions \
33 --enable-scriptdir=/usr/share/zsh/scripts \
34 --with-tcsetpgrp \
35 $CONFIGURE_ARGS &&
36 make -j 1 &&
37 make install
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir $fs/etc
44 mkdir -p $fs/usr/share/zsh
45 mkdir -p $fs/usr/share/zsh/scripts
47 cp -a $install/bin $fs
49 # Configuration files.
50 cp $stuff/example.zshrc $fs/etc/zshrc
52 #no way around this... gen_package will not automatically copy these
53 cp -r $install/usr/share/zsh/functions \
54 $fs/usr/share/zsh
55 }
57 # Post install commands for Tazpkg.
58 # Check /bin/sh stat.
59 #
60 post_install()
61 {
62 sh=$(readlink "$1/bin/sh")
63 if [ "$sh" != '/bin/zsh' ]
64 then
65 echo ''
66 echo "**** Actual SH link : $sh"
67 echo ''
68 echo -n 'Do you want Zsh for /bin/sh (y/N) ? : '
69 read -t 30 answer < /dev/tty
70 if [ "$answer" = 'y' ]
71 then
72 echo ''
73 action 'Removing sh link to make a new one pointing on /bin/zsh...'
74 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh"
75 status
76 else
77 echo ''
78 echo "Leaving /bin/sh to : $sh"
79 fi
80 fi
81 }
83 # Restore a valid sh link if needed.
84 pre_remove()
85 {
86 sh=$(readlink "$1/bin/sh")
87 [ "$sh" != 'busybox' ] &&
88 ln -sf /bin/busybox "$1/bin/sh"
89 }