wok annotate bash/receipt @ rev 10344

bash: use native gcc it dont cross compile
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 22 20:24:44 2011 +0200 (2011-05-22)
parents 342cd0420c47
children e2c80c0bf72a
rev   line source
pankso@14 1 # SliTaz package receipt.
pankso@14 2
pankso@14 3 PACKAGE="bash"
slaxemulator@8720 4 VERSION="4.2"
pankso@202 5 CATEGORY="system-tools"
pankso@14 6 SHORT_DESC="The GNU bourne SHell."
pankso@14 7 MAINTAINER="pankso@slitaz.org"
gokhlayeh@8171 8 DEPENDS="readline"
gokhlayeh@8171 9 BUILD_DEPENDS="readline bison"
pankso@14 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@14 11 WEB_SITE="http://www.gnu.org/software/bash/"
pankso@14 12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@10344 13 CROSS="bug"
pankso@14 14
gokhlayeh@8171 15 # Rules to compile & install the temporary toolchain.
gokhlayeh@8171 16 cook_tmp_toolchain()
gokhlayeh@8171 17 {
gokhlayeh@8171 18 cd $src
gokhlayeh@8171 19 ./configure --without-bash-malloc &&
gokhlayeh@8171 20 make && make install
gokhlayeh@8171 21 }
gokhlayeh@8171 22
pankso@14 23 # Rules to configure and make the package.
pankso@14 24 compile_rules()
pankso@14 25 {
pankso@14 26 # Patch and then build.
pankso@14 27 cd $src
pankso@10344 28 ./configure \
pankso@10344 29 --build=$HOST_SYSTEM \
pankso@10344 30 --host=$HOST_SYSTEM \
pankso@10344 31 --bindir=/bin \
gokhlayeh@8171 32 --enable-history --enable-alias \
gokhlayeh@8171 33 --disable-nls --without-bash-malloc \
pankso@10344 34 --disable-help-builtin \
pankso@10344 35 --with-installed-readline &&
pascal@1553 36 make &&
gokhlayeh@8171 37 # Bash doesn't care about DESTDIR in environnment variable.
gokhlayeh@8171 38 make DESTDIR=$DESTDIR install
pankso@14 39 }
pankso@14 40
pankso@14 41 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@14 42 genpkg_rules()
pankso@14 43 {
pankso@14 44 cp -a $_pkg/bin $fs
pankso@14 45 # Config files.
pankso@14 46 #
pankso@14 47 mkdir $fs/etc
pankso@9697 48 cp $stuff/example.bashrc $fs/etc/bashrc
pankso@14 49 }
pankso@14 50
pankso@14 51 # Post install commands for Tazpkg.
pankso@14 52 # Check /bin/sh stat.
pankso@14 53 #
pankso@14 54 post_install()
pankso@14 55 {
pankso@14 56 local root
pankso@14 57 root=$1
pankso@14 58 echo "Processing post-install commands..."
pankso@14 59 sh=`readlink $root/bin/sh`
pankso@14 60 if [ ! "$sh" = "/bin/bash" ]; then
pankso@14 61 echo ""
pankso@14 62 echo "**** Actual SH link : $sh"
pankso@14 63 echo ""
gokhlayeh@7635 64 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
gokhlayeh@7635 65 read -t 30 anser
pankso@2300 66 if [ "$anser" == "yes" ]; then
pankso@14 67 echo ""
paul@2534 68 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
pankso@14 69 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
pankso@14 70 status
pankso@14 71 else
pankso@14 72 echo ""
pankso@14 73 echo "Leaving /bin/sh to : $sh"
pankso@14 74 fi
pankso@14 75 fi
pankso@14 76 }
pankso@2156 77
pankso@2156 78 # Restore a valid sh link if needed.
pankso@2156 79 pre_remove()
pankso@2156 80 {
slaxemulator@9610 81 local root
slaxemulator@9610 82 root=$1
slaxemulator@9610 83 sh=`readlink $root/bin/sh`
pankso@2156 84 if [ ! "$sh" = "busybox" ]; then
slaxemulator@9610 85 rm $root/bin/sh &&
slaxemulator@9610 86 ln -s /bin/busybox $root/bin/sh
pankso@2156 87 fi
pankso@2156 88 }