wok-next view bash/receipt @ rev 9670

openerp-web: fix init script
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 02 16:23:17 2011 +0200 (2011-05-02)
parents 02bbaa9d12ba
children a1644dbcf632
line source
1 # SliTaz package receipt.
3 PACKAGE="bash"
4 VERSION="4.2"
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 cd $src
18 ./configure --without-bash-malloc &&
19 make && make install
20 }
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 # Patch and then build.
26 cd $src
27 ./configure --bindir=/bin \
28 --enable-history --enable-alias \
29 --disable-nls --without-bash-malloc \
30 --disable-help-builtin --with-installed-readline &&
31 make &&
32 # Bash doesn't care about DESTDIR in environnment variable.
33 make DESTDIR=$DESTDIR install
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 cp -a $_pkg/bin $fs
40 # Config files.
41 #
42 mkdir $fs/etc
43 cp stuff/example.bashrc $fs/etc/bashrc
44 }
46 # Post install commands for Tazpkg.
47 # Check /bin/sh stat.
48 #
49 post_install()
50 {
51 local root
52 root=$1
53 echo "Processing post-install commands..."
54 sh=`readlink $root/bin/sh`
55 if [ ! "$sh" = "/bin/bash" ]; then
56 echo ""
57 echo "**** Actual SH link : $sh"
58 echo ""
59 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
60 read -t 30 anser
61 if [ "$anser" == "yes" ]; then
62 echo ""
63 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
64 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
65 status
66 else
67 echo ""
68 echo "Leaving /bin/sh to : $sh"
69 fi
70 fi
71 }
73 # Restore a valid sh link if needed.
74 pre_remove()
75 {
76 local root
77 root=$1
78 sh=`readlink $root/bin/sh`
79 if [ ! "$sh" = "busybox" ]; then
80 rm $root/bin/sh &&
81 ln -s /bin/busybox $root/bin/sh
82 fi
83 }