wok annotate zsh/receipt @ rev 21182

get-xnviewmp: rm XnView (not XnViewMP)
author Hans-G?nter Theisgen
date Tue Apr 02 16:53:10 2019 +0100 (2019-04-02)
parents 02c70d036ea0
children 98d2ef9efb67
rev   line source
pascal@1531 1 # SliTaz package receipt.
pascal@1531 2
pascal@1531 3 PACKAGE="zsh"
Hans-G?nter@21144 4 VERSION="5.7.1"
pascal@1531 5 CATEGORY="system-tools"
Hans-G?nter@21144 6 TAGS="shell"
Hans-G?nter@21144 7 SHORT_DESC="Zsh shell incorporates many features of bash, ksh, and tcsh."
pascal@1531 8 MAINTAINER="sandys@gmail.com"
pascal@15361 9 LICENSE="other"
Hans-G?nter@21144 10 WEB_SITE="https://www.zsh.org/"
pascal@1531 11
Hans-G?nter@21144 12 TARBALL="$PACKAGE-$VERSION.tar.xz"
Hans-G?nter@21144 13 WGET_URL="${WEB_SITE}pub/$TARBALL"
Hans-G?nter@21144 14
Hans-G?nter@21144 15 DEPENDS="gdbm ncurses ncursesw zlib"
slaxemulator@11123 16 BUILD_DEPENDS="ncurses-dev zlib-dev"
slaxemulator@11123 17
pascal@1531 18 # Rules to configure and make the package.
pascal@1531 19 compile_rules()
pascal@1531 20 {
Hans-G?nter@21144 21 ./configure \
Hans-G?nter@21144 22 --bindir=/bin \
Hans-G?nter@21144 23 --disable-dynamic \
Hans-G?nter@21144 24 --enable-multibyte \
Hans-G?nter@21144 25 --enable-fndir=/usr/share/zsh/functions \
Hans-G?nter@21144 26 --enable-scriptdir=/usr/share/zsh/scripts \
Hans-G?nter@21144 27 --with-tcsetpgrp \
Hans-G?nter@21144 28 $CONFIGURE_ARGS &&
Hans-G?nter@21144 29 make -j 1 &&
slaxemulator@9723 30 make install
pascal@1531 31 }
pascal@1531 32
pascal@1531 33 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1531 34 genpkg_rules()
al@18741 35 {
pascal@15361 36 cp -a $install/bin $fs
pascal@1531 37
Hans-G?nter@21144 38 # Configuration files.
pascal@1531 39 mkdir $fs/etc
slaxemulator@9723 40 cp $stuff/example.zshrc $fs/etc/zshrc
al@18741 41
pascal@1531 42 #no way around this... gen_package will not automatically copy these
pascal@1531 43 mkdir -p $fs/usr/share/zsh
pascal@15361 44 cp -r $install/usr/share/zsh/functions $fs/usr/share/zsh
pascal@1531 45
pascal@1531 46 mkdir -p $fs/usr/share/zsh/scripts
pascal@1531 47 }
pascal@1531 48
pascal@1531 49 # Post install commands for Tazpkg.
pascal@1531 50 # Check /bin/sh stat.
pascal@1531 51 #
pascal@1531 52 post_install()
pascal@1531 53 {
pascal@18730 54 sh=$(readlink "$1/bin/sh")
al@18741 55 if [ "$sh" != '/bin/zsh' ]; then
al@18741 56 echo ''
pascal@1531 57 echo "**** Actual SH link : $sh"
al@18741 58 echo ''
al@18741 59 echo -n 'Do you want Zsh for /bin/sh (y/N) ? : '
pascal@6073 60 read -t 30 answer < /dev/tty
pascal@20892 61 if [ "$answer" = 'y' ]; then
al@18741 62 echo ''
al@18741 63 action 'Removing sh link to make a new one pointing on /bin/zsh...'
pascal@18730 64 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh"
pascal@1531 65 status
pascal@1531 66 else
al@18741 67 echo ''
pascal@1531 68 echo "Leaving /bin/sh to : $sh"
pascal@1531 69 fi
pascal@1531 70 fi
pascal@1531 71 }
mojo@11667 72
mojo@11667 73 # Restore a valid sh link if needed.
mojo@11667 74 pre_remove()
mojo@11667 75 {
al@18741 76 sh=$(readlink "$1/bin/sh")
al@18741 77 [ "$sh" != 'busybox' ] && ln -sf /bin/busybox "$1/bin/sh"
mojo@11667 78 }