wok view zsh/receipt @ rev 24417

created recipes for perl-cairo-gobject, perl-glib-object-introspection and perl-gtk3
author Hans-G?nter Theisgen
date Fri Feb 11 09:16:47 2022 +0100 (2022-02-11)
parents 98d2ef9efb67
children 94dd3813f40d
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 # 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 }