wok annotate bash/receipt @ rev 9316
Up openvas-manager (1.0.4)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 18 09:19:41 2011 +0100 (2011-03-18) |
parents | fa7b7514e1d8 |
children | 02bbaa9d12ba |
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 strip -s $fs/bin/bash |
pankso@14 | 41 # Config files. |
pankso@14 | 42 # |
pankso@14 | 43 mkdir $fs/etc |
pankso@14 | 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 { |
pankso@2156 | 77 sh=`readlink /bin/sh` |
pankso@2156 | 78 if [ ! "$sh" = "busybox" ]; then |
paul@2534 | 79 rm /bin/sh && |
pankso@2156 | 80 ln -s /bin/busybox /bin/sh |
pankso@2156 | 81 fi |
pankso@2156 | 82 } |