wok-next annotate bash/receipt @ rev 8205
imported patch toolchain/pam-dev.patch
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Thu Jan 27 00:20:50 2011 +0100 (2011-01-27) |
parents | 20ec1b757fe7 |
children | d9b22fc06137 |
rev | line source |
---|---|
pankso@14 | 1 # SliTaz package receipt. |
pankso@14 | 2 |
pankso@14 | 3 PACKAGE="bash" |
gokhlayeh@7896 | 4 VERSION="4.1" |
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 # Patch and then build. |
gokhlayeh@8171 | 18 cd $src |
gokhlayeh@8171 | 19 patch -Np1 -i ../stuff/bash-4.1-fixes-3.patch |
gokhlayeh@8171 | 20 ./configure --without-bash-malloc && |
gokhlayeh@8171 | 21 make && make install |
gokhlayeh@8171 | 22 } |
gokhlayeh@8171 | 23 |
pankso@14 | 24 # Rules to configure and make the package. |
pankso@14 | 25 compile_rules() |
pankso@14 | 26 { |
pankso@14 | 27 # Patch and then build. |
pankso@14 | 28 cd $src |
gokhlayeh@8171 | 29 patch -Np1 -i ../stuff/bash-4.1-fixes-3.patch |
gokhlayeh@8171 | 30 ./configure --bindir=/bin \ |
gokhlayeh@8171 | 31 --enable-history --enable-alias \ |
gokhlayeh@8171 | 32 --disable-nls --without-bash-malloc \ |
gokhlayeh@8171 | 33 --disable-help-builtin --with-installed-readline && |
pascal@1553 | 34 make && |
gokhlayeh@8171 | 35 # Bash doesn't care about DESTDIR in environnment variable. |
gokhlayeh@8171 | 36 make DESTDIR=$DESTDIR install |
pankso@14 | 37 } |
pankso@14 | 38 |
pankso@14 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@14 | 40 genpkg_rules() |
pankso@14 | 41 { |
pankso@14 | 42 cp -a $_pkg/bin $fs |
pankso@14 | 43 strip -s $fs/bin/bash |
pankso@14 | 44 # Config files. |
pankso@14 | 45 # |
pankso@14 | 46 mkdir $fs/etc |
pankso@14 | 47 cp stuff/example.bashrc $fs/etc/bashrc |
pankso@14 | 48 } |
pankso@14 | 49 |
pankso@14 | 50 # Post install commands for Tazpkg. |
pankso@14 | 51 # Check /bin/sh stat. |
pankso@14 | 52 # |
pankso@14 | 53 post_install() |
pankso@14 | 54 { |
pankso@14 | 55 local root |
pankso@14 | 56 root=$1 |
pankso@14 | 57 echo "Processing post-install commands..." |
pankso@14 | 58 sh=`readlink $root/bin/sh` |
pankso@14 | 59 if [ ! "$sh" = "/bin/bash" ]; then |
pankso@14 | 60 echo "" |
pankso@14 | 61 echo "**** Actual SH link : $sh" |
pankso@14 | 62 echo "" |
gokhlayeh@7635 | 63 echo -n "Do you want Bash for /bin/sh (yes/No) ? : " |
gokhlayeh@7635 | 64 read -t 30 anser |
pankso@2300 | 65 if [ "$anser" == "yes" ]; then |
pankso@14 | 66 echo "" |
paul@2534 | 67 echo -n "Removing sh link to make a new one pointing on /bin/bash..." |
pankso@14 | 68 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh |
pankso@14 | 69 status |
pankso@14 | 70 else |
pankso@14 | 71 echo "" |
pankso@14 | 72 echo "Leaving /bin/sh to : $sh" |
pankso@14 | 73 fi |
pankso@14 | 74 fi |
pankso@14 | 75 } |
pankso@2156 | 76 |
pankso@2156 | 77 # Restore a valid sh link if needed. |
pankso@2156 | 78 pre_remove() |
pankso@2156 | 79 { |
pankso@2156 | 80 sh=`readlink /bin/sh` |
pankso@2156 | 81 if [ ! "$sh" = "busybox" ]; then |
paul@2534 | 82 rm /bin/sh && |
pankso@2156 | 83 ln -s /bin/busybox /bin/sh |
pankso@2156 | 84 fi |
pankso@2156 | 85 } |