wok annotate zsh/receipt @ rev 24170
updated otf-gfs
author | Hans-G?nter Theisgen |
---|---|
date | Wed Dec 29 07:55:54 2021 +0100 (2021-12-29) |
parents | beba30c03091 |
children | 922f061231c2 |
rev | line source |
---|---|
pascal@1531 | 1 # SliTaz package receipt. |
pascal@1531 | 2 |
pascal@1531 | 3 PACKAGE="zsh" |
Hans-G?nter@23795 | 4 VERSION="5.8" |
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 { |
Hans-G?nter@23795 | 36 mkdir $fs/etc |
Hans-G?nter@23795 | 37 mkdir -p $fs/usr/share/zsh |
Hans-G?nter@23795 | 38 mkdir -p $fs/usr/share/zsh/scripts |
Hans-G?nter@23795 | 39 |
Hans-G?nter@23795 | 40 cp -a $install/bin $fs |
pascal@1531 | 41 |
Hans-G?nter@21144 | 42 # Configuration files. |
slaxemulator@9723 | 43 cp $stuff/example.zshrc $fs/etc/zshrc |
al@18741 | 44 |
pascal@1531 | 45 #no way around this... gen_package will not automatically copy these |
Hans-G?nter@23795 | 46 cp -r $install/usr/share/zsh/functions \ |
Hans-G?nter@23795 | 47 $fs/usr/share/zsh |
pascal@1531 | 48 } |
pascal@1531 | 49 |
pascal@1531 | 50 # Post install commands for Tazpkg. |
pascal@1531 | 51 # Check /bin/sh stat. |
pascal@1531 | 52 # |
pascal@1531 | 53 post_install() |
pascal@1531 | 54 { |
pascal@18730 | 55 sh=$(readlink "$1/bin/sh") |
Hans-G?nter@23795 | 56 if [ "$sh" != '/bin/zsh' ] |
Hans-G?nter@23795 | 57 then |
al@18741 | 58 echo '' |
pascal@1531 | 59 echo "**** Actual SH link : $sh" |
al@18741 | 60 echo '' |
al@18741 | 61 echo -n 'Do you want Zsh for /bin/sh (y/N) ? : ' |
pascal@6073 | 62 read -t 30 answer < /dev/tty |
Hans-G?nter@23795 | 63 if [ "$answer" = 'y' ] |
Hans-G?nter@23795 | 64 then |
al@18741 | 65 echo '' |
al@18741 | 66 action 'Removing sh link to make a new one pointing on /bin/zsh...' |
pascal@18730 | 67 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh" |
pascal@1531 | 68 status |
Hans-G?nter@23795 | 69 else |
al@18741 | 70 echo '' |
pascal@1531 | 71 echo "Leaving /bin/sh to : $sh" |
pascal@1531 | 72 fi |
pascal@1531 | 73 fi |
pascal@1531 | 74 } |
mojo@11667 | 75 |
mojo@11667 | 76 # Restore a valid sh link if needed. |
mojo@11667 | 77 pre_remove() |
mojo@11667 | 78 { |
al@18741 | 79 sh=$(readlink "$1/bin/sh") |
Hans-G?nter@23795 | 80 [ "$sh" != 'busybox' ] && |
Hans-G?nter@23795 | 81 ln -sf /bin/busybox "$1/bin/sh" |
mojo@11667 | 82 } |