wok annotate bash/receipt @ rev 9599

busybox/httpd_helper.sh: local header variable
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 13 13:39:37 2011 +0200 (2011-04-13)
parents d9b22fc06137
children 1ce24ad68c14
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 \
gokhlayeh@8171 30 --disable-help-builtin --with-installed-readline &&
pascal@1553 31 make &&
gokhlayeh@8171 32 # Bash doesn't care about DESTDIR in environnment variable.
gokhlayeh@8171 33 make DESTDIR=$DESTDIR install
pankso@14 34 }
pankso@14 35
pankso@14 36 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@14 37 genpkg_rules()
pankso@14 38 {
pankso@14 39 cp -a $_pkg/bin $fs
pankso@14 40 # Config files.
pankso@14 41 #
pankso@14 42 mkdir $fs/etc
pankso@14 43 cp stuff/example.bashrc $fs/etc/bashrc
pankso@14 44 }
pankso@14 45
pankso@14 46 # Post install commands for Tazpkg.
pankso@14 47 # Check /bin/sh stat.
pankso@14 48 #
pankso@14 49 post_install()
pankso@14 50 {
pankso@14 51 local root
pankso@14 52 root=$1
pankso@14 53 echo "Processing post-install commands..."
pankso@14 54 sh=`readlink $root/bin/sh`
pankso@14 55 if [ ! "$sh" = "/bin/bash" ]; then
pankso@14 56 echo ""
pankso@14 57 echo "**** Actual SH link : $sh"
pankso@14 58 echo ""
gokhlayeh@7635 59 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
gokhlayeh@7635 60 read -t 30 anser
pankso@2300 61 if [ "$anser" == "yes" ]; then
pankso@14 62 echo ""
paul@2534 63 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
pankso@14 64 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
pankso@14 65 status
pankso@14 66 else
pankso@14 67 echo ""
pankso@14 68 echo "Leaving /bin/sh to : $sh"
pankso@14 69 fi
pankso@14 70 fi
pankso@14 71 }
pankso@2156 72
pankso@2156 73 # Restore a valid sh link if needed.
pankso@2156 74 pre_remove()
pankso@2156 75 {
pankso@2156 76 sh=`readlink /bin/sh`
pankso@2156 77 if [ ! "$sh" = "busybox" ]; then
paul@2534 78 rm /bin/sh &&
pankso@2156 79 ln -s /bin/busybox /bin/sh
pankso@2156 80 fi
pankso@2156 81 }