wok-4.x annotate bash/receipt @ rev 7762

Up: tazlito (3.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Dec 22 13:37:46 2010 +0100 (2010-12-22)
parents 8b1a253d2a0e
children 20ec1b757fe7
rev   line source
pankso@14 1 # SliTaz package receipt.
pankso@14 2
pankso@14 3 PACKAGE="bash"
pankso@2300 4 VERSION="4.0"
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
pascal@1553 18 [ -f done.bash32-025.patch ] ||
pascal@1553 19 busybox patch -p1 -i ../stuff/bash32-025.patch
pascal@1553 20 touch done.bash32-025.patch
pankso@14 21 ./configure --prefix=/usr --bindir=/bin \
pankso@14 22 --enable-history --enable-alias \
pankso@14 23 --disable-nls --without-bash-malloc \
paul@2534 24 --disable-help-builtin \
pankso@14 25 --infodir=/usr/share/info --mandir=/usr/share/man \
pascal@1553 26 $CONFIGURE_ARGS &&
pascal@1553 27 make &&
pankso@14 28 make DESTDIR=$PWD/_pkg install
pankso@14 29 }
pankso@14 30
pankso@14 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@14 32 genpkg_rules()
pankso@14 33 {
pankso@14 34 cp -a $_pkg/bin $fs
pankso@14 35 strip -s $fs/bin/bash
pankso@14 36 # Config files.
pankso@14 37 #
pankso@14 38 mkdir $fs/etc
pankso@14 39 cp stuff/example.bashrc $fs/etc/bashrc
pankso@14 40 }
pankso@14 41
pankso@14 42 # Post install commands for Tazpkg.
pankso@14 43 # Check /bin/sh stat.
pankso@14 44 #
pankso@14 45 post_install()
pankso@14 46 {
pankso@14 47 local root
pankso@14 48 root=$1
pankso@14 49 echo "Processing post-install commands..."
pankso@14 50 sh=`readlink $root/bin/sh`
pankso@14 51 if [ ! "$sh" = "/bin/bash" ]; then
pankso@14 52 echo ""
pankso@14 53 echo "**** Actual SH link : $sh"
pankso@14 54 echo ""
gokhlayeh@7635 55 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
gokhlayeh@7635 56 read -t 30 anser
pankso@2300 57 if [ "$anser" == "yes" ]; then
pankso@14 58 echo ""
paul@2534 59 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
pankso@14 60 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
pankso@14 61 status
pankso@14 62 else
pankso@14 63 echo ""
pankso@14 64 echo "Leaving /bin/sh to : $sh"
pankso@14 65 fi
pankso@14 66 fi
pankso@14 67 }
pankso@2156 68
pankso@2156 69 # Restore a valid sh link if needed.
pankso@2156 70 pre_remove()
pankso@2156 71 {
pankso@2156 72 sh=`readlink /bin/sh`
pankso@2156 73 if [ ! "$sh" = "busybox" ]; then
paul@2534 74 rm /bin/sh &&
pankso@2156 75 ln -s /bin/busybox /bin/sh
pankso@2156 76 fi
pankso@2156 77 }