wok-next view zsh/receipt @ rev 21397

opentyrian: add "glib" to bdeps for /usr/bin/glib-compile-schemas
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Apr 18 17:26:44 2020 +0300 (2020-04-18)
parents 6c12ac1293fc
children
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="devel@slitaz.org"
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"
15 BUILD_DEPENDS="ncurses-dev zlib-dev"
17 compile_rules() {
18 ./configure \
19 --bindir=/bin \
20 --disable-dynamic \
21 --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 genpkg_rules() {
31 cp -a $install/bin $fs
33 # Config files.
35 mkdir $fs/etc
36 cp $stuff/example.zshrc $fs/etc/zshrc
38 #no way around this... gen_package will not automatically copy these
39 mkdir -p $fs/usr/share/zsh
40 cp -r $install/usr/share/zsh/functions $fs/usr/share/zsh
42 mkdir -p $fs/usr/share/zsh/scripts
43 }
45 post_install() {
46 sh=$(readlink "$1/bin/sh")
47 if [ "$sh" != '/bin/zsh' ]; then
48 echo ''
49 echo "**** Actual SH link : $sh"
50 echo ''
51 echo -n 'Do you want Zsh for /bin/sh (y/N) ? : '
52 read -t 30 answer < /dev/tty
53 if [ "$answer" == 'y' ]; then
54 echo ''
55 action 'Removing sh link to make a new one pointing on /bin/zsh...'
56 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh"
57 status
58 else
59 echo ''
60 echo "Leaving /bin/sh to : $sh"
61 fi
62 fi
63 }
65 # Restore a valid sh link if needed.
66 pre_remove() {
67 sh=$(readlink "$1/bin/sh")
68 [ "$sh" != 'busybox' ] && ln -sf /bin/busybox "$1/bin/sh"
69 }