wok view bash/receipt @ rev 8179

imported patch toolchain/gawk.patch
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Jan 27 00:20:49 2011 +0100 (2011-01-27)
parents 20ec1b757fe7
children d9b22fc06137
line source
1 # SliTaz package receipt.
3 PACKAGE="bash"
4 VERSION="4.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="The GNU bourne SHell."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="readline"
9 BUILD_DEPENDS="readline bison"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.gnu.org/software/bash/"
12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
14 # Rules to compile & install the temporary toolchain.
15 cook_tmp_toolchain()
16 {
17 # Patch and then build.
18 cd $src
19 patch -Np1 -i ../stuff/bash-4.1-fixes-3.patch
20 ./configure --without-bash-malloc &&
21 make && make install
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 # Patch and then build.
28 cd $src
29 patch -Np1 -i ../stuff/bash-4.1-fixes-3.patch
30 ./configure --bindir=/bin \
31 --enable-history --enable-alias \
32 --disable-nls --without-bash-malloc \
33 --disable-help-builtin --with-installed-readline &&
34 make &&
35 # Bash doesn't care about DESTDIR in environnment variable.
36 make DESTDIR=$DESTDIR install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 cp -a $_pkg/bin $fs
43 strip -s $fs/bin/bash
44 # Config files.
45 #
46 mkdir $fs/etc
47 cp stuff/example.bashrc $fs/etc/bashrc
48 }
50 # Post install commands for Tazpkg.
51 # Check /bin/sh stat.
52 #
53 post_install()
54 {
55 local root
56 root=$1
57 echo "Processing post-install commands..."
58 sh=`readlink $root/bin/sh`
59 if [ ! "$sh" = "/bin/bash" ]; then
60 echo ""
61 echo "**** Actual SH link : $sh"
62 echo ""
63 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
64 read -t 30 anser
65 if [ "$anser" == "yes" ]; then
66 echo ""
67 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
68 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
69 status
70 else
71 echo ""
72 echo "Leaving /bin/sh to : $sh"
73 fi
74 fi
75 }
77 # Restore a valid sh link if needed.
78 pre_remove()
79 {
80 sh=`readlink /bin/sh`
81 if [ ! "$sh" = "busybox" ]; then
82 rm /bin/sh &&
83 ln -s /bin/busybox /bin/sh
84 fi
85 }