wok annotate bash/receipt @ rev 6376

Up: bzip2, bzip2-dev, bzlib to 1.0.6.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Sep 21 12:11:24 2010 +0000 (2010-09-21)
parents 52b7909de402
children 152a1f9dc01a
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 ""
pankso@2300 55 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "; read anser
pankso@2300 56 if [ "$anser" == "yes" ]; then
pankso@14 57 echo ""
paul@2534 58 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
pankso@14 59 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
pankso@14 60 status
pankso@14 61 else
pankso@14 62 echo ""
pankso@14 63 echo "Leaving /bin/sh to : $sh"
pankso@14 64 fi
pankso@14 65 fi
pankso@14 66 }
pankso@2156 67
pankso@2156 68 # Restore a valid sh link if needed.
pankso@2156 69 pre_remove()
pankso@2156 70 {
pankso@2156 71 sh=`readlink /bin/sh`
pankso@2156 72 if [ ! "$sh" = "busybox" ]; then
paul@2534 73 rm /bin/sh &&
pankso@2156 74 ln -s /bin/busybox /bin/sh
pankso@2156 75 fi
pankso@2156 76 }