wok-next annotate bash/receipt @ rev 7896
Up: bash 4.1
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Jan 09 14:02:54 2011 +0100 (2011-01-09) |
parents | 152a1f9dc01a |
children | fa7b7514e1d8 |
rev | line source |
---|---|
pankso@14 | 1 # SliTaz package receipt. |
pankso@14 | 2 |
pankso@14 | 3 PACKAGE="bash" |
gokhlayeh@7896 | 4 VERSION="4.1" |
pankso@202 | 5 CATEGORY="system-tools" |
pankso@14 | 6 SHORT_DESC="The GNU bourne SHell." |
pankso@14 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@14 | 8 DEPENDS="ncurses" |
pankso@14 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@14 | 10 WEB_SITE="http://www.gnu.org/software/bash/" |
pankso@14 | 11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" |
pankso@14 | 12 |
pankso@14 | 13 # Rules to configure and make the package. |
pankso@14 | 14 compile_rules() |
pankso@14 | 15 { |
pankso@14 | 16 # Patch and then build. |
pankso@14 | 17 cd $src |
gokhlayeh@7896 | 18 |
gokhlayeh@7896 | 19 [ -f done.bash-4.1-fixes-3.patch ] || |
gokhlayeh@7896 | 20 patch -Np1 -i ../stuff/bash-4.1-fixes-3.patch |
gokhlayeh@7896 | 21 touch done.bash-4.1-fixes-3.patch |
pankso@14 | 22 ./configure --prefix=/usr --bindir=/bin \ |
pankso@14 | 23 --enable-history --enable-alias \ |
pankso@14 | 24 --disable-nls --without-bash-malloc \ |
paul@2534 | 25 --disable-help-builtin \ |
pankso@14 | 26 --infodir=/usr/share/info --mandir=/usr/share/man \ |
pascal@1553 | 27 $CONFIGURE_ARGS && |
pascal@1553 | 28 make && |
pankso@14 | 29 make DESTDIR=$PWD/_pkg install |
pankso@14 | 30 } |
pankso@14 | 31 |
pankso@14 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@14 | 33 genpkg_rules() |
pankso@14 | 34 { |
pankso@14 | 35 cp -a $_pkg/bin $fs |
pankso@14 | 36 strip -s $fs/bin/bash |
pankso@14 | 37 # Config files. |
pankso@14 | 38 # |
pankso@14 | 39 mkdir $fs/etc |
pankso@14 | 40 cp stuff/example.bashrc $fs/etc/bashrc |
pankso@14 | 41 } |
pankso@14 | 42 |
pankso@14 | 43 # Post install commands for Tazpkg. |
pankso@14 | 44 # Check /bin/sh stat. |
pankso@14 | 45 # |
pankso@14 | 46 post_install() |
pankso@14 | 47 { |
pankso@14 | 48 local root |
pankso@14 | 49 root=$1 |
pankso@14 | 50 echo "Processing post-install commands..." |
pankso@14 | 51 sh=`readlink $root/bin/sh` |
pankso@14 | 52 if [ ! "$sh" = "/bin/bash" ]; then |
pankso@14 | 53 echo "" |
pankso@14 | 54 echo "**** Actual SH link : $sh" |
pankso@14 | 55 echo "" |
gokhlayeh@7635 | 56 echo -n "Do you want Bash for /bin/sh (yes/No) ? : " |
gokhlayeh@7635 | 57 read -t 30 anser |
pankso@2300 | 58 if [ "$anser" == "yes" ]; then |
pankso@14 | 59 echo "" |
paul@2534 | 60 echo -n "Removing sh link to make a new one pointing on /bin/bash..." |
pankso@14 | 61 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh |
pankso@14 | 62 status |
pankso@14 | 63 else |
pankso@14 | 64 echo "" |
pankso@14 | 65 echo "Leaving /bin/sh to : $sh" |
pankso@14 | 66 fi |
pankso@14 | 67 fi |
pankso@14 | 68 } |
pankso@2156 | 69 |
pankso@2156 | 70 # Restore a valid sh link if needed. |
pankso@2156 | 71 pre_remove() |
pankso@2156 | 72 { |
pankso@2156 | 73 sh=`readlink /bin/sh` |
pankso@2156 | 74 if [ ! "$sh" = "busybox" ]; then |
paul@2534 | 75 rm /bin/sh && |
pankso@2156 | 76 ln -s /bin/busybox /bin/sh |
pankso@2156 | 77 fi |
pankso@2156 | 78 } |