wok-current annotate bash/receipt @ rev 10084

Up: libsigc++ to 2.2.9.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri May 20 06:45:08 2011 +0000 (2011-05-20)
parents a1644dbcf632
children 704c6dd3e3ab
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@14 13
gokhlayeh@8171 14 # Rules to compile & install the temporary toolchain.
gokhlayeh@8171 15 cook_tmp_toolchain()
gokhlayeh@8171 16 {
gokhlayeh@8171 17 cd $src
gokhlayeh@8171 18 ./configure --without-bash-malloc &&
gokhlayeh@8171 19 make && make install
gokhlayeh@8171 20 }
gokhlayeh@8171 21
pankso@14 22 # Rules to configure and make the package.
pankso@14 23 compile_rules()
pankso@14 24 {
pankso@14 25 # Patch and then build.
pankso@14 26 cd $src
gokhlayeh@8171 27 ./configure --bindir=/bin \
gokhlayeh@8171 28 --enable-history --enable-alias \
gokhlayeh@8171 29 --disable-nls --without-bash-malloc \
slaxemulator@10053 30 --disable-help-builtin --with-installed-readline \
slaxemulator@10053 31 $CONFIGURE_ARGS &&
pascal@1553 32 make &&
gokhlayeh@8171 33 # Bash doesn't care about DESTDIR in environnment variable.
gokhlayeh@8171 34 make DESTDIR=$DESTDIR install
pankso@14 35 }
pankso@14 36
pankso@14 37 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@14 38 genpkg_rules()
pankso@14 39 {
pankso@14 40 cp -a $_pkg/bin $fs
pankso@14 41 # Config files.
pankso@14 42 #
pankso@14 43 mkdir $fs/etc
pankso@9697 44 cp $stuff/example.bashrc $fs/etc/bashrc
pankso@14 45 }
pankso@14 46
pankso@14 47 # Post install commands for Tazpkg.
pankso@14 48 # Check /bin/sh stat.
pankso@14 49 #
pankso@14 50 post_install()
pankso@14 51 {
pankso@14 52 local root
pankso@14 53 root=$1
pankso@14 54 echo "Processing post-install commands..."
pankso@14 55 sh=`readlink $root/bin/sh`
pankso@14 56 if [ ! "$sh" = "/bin/bash" ]; then
pankso@14 57 echo ""
pankso@14 58 echo "**** Actual SH link : $sh"
pankso@14 59 echo ""
gokhlayeh@7635 60 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
gokhlayeh@7635 61 read -t 30 anser
pankso@2300 62 if [ "$anser" == "yes" ]; then
pankso@14 63 echo ""
paul@2534 64 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
pankso@14 65 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
pankso@14 66 status
pankso@14 67 else
pankso@14 68 echo ""
pankso@14 69 echo "Leaving /bin/sh to : $sh"
pankso@14 70 fi
pankso@14 71 fi
pankso@14 72 }
pankso@2156 73
pankso@2156 74 # Restore a valid sh link if needed.
pankso@2156 75 pre_remove()
pankso@2156 76 {
slaxemulator@9610 77 local root
slaxemulator@9610 78 root=$1
slaxemulator@9610 79 sh=`readlink $root/bin/sh`
pankso@2156 80 if [ ! "$sh" = "busybox" ]; then
slaxemulator@9610 81 rm $root/bin/sh &&
slaxemulator@9610 82 ln -s /bin/busybox $root/bin/sh
pankso@2156 83 fi
pankso@2156 84 }