wok-next view bash/receipt @ rev 7931
Up: slitaz-tools (4.0)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Jan 11 13:40:16 2011 +0100 (2011-01-11) |
parents | 152a1f9dc01a |
children | fa7b7514e1d8 |
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="ncurses"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.gnu.org/software/bash/"
11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 # Patch and then build.
17 cd $src
19 [ -f done.bash-4.1-fixes-3.patch ] ||
20 patch -Np1 -i ../stuff/bash-4.1-fixes-3.patch
21 touch done.bash-4.1-fixes-3.patch
22 ./configure --prefix=/usr --bindir=/bin \
23 --enable-history --enable-alias \
24 --disable-nls --without-bash-malloc \
25 --disable-help-builtin \
26 --infodir=/usr/share/info --mandir=/usr/share/man \
27 $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$PWD/_pkg install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 cp -a $_pkg/bin $fs
36 strip -s $fs/bin/bash
37 # Config files.
38 #
39 mkdir $fs/etc
40 cp stuff/example.bashrc $fs/etc/bashrc
41 }
43 # Post install commands for Tazpkg.
44 # Check /bin/sh stat.
45 #
46 post_install()
47 {
48 local root
49 root=$1
50 echo "Processing post-install commands..."
51 sh=`readlink $root/bin/sh`
52 if [ ! "$sh" = "/bin/bash" ]; then
53 echo ""
54 echo "**** Actual SH link : $sh"
55 echo ""
56 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
57 read -t 30 anser
58 if [ "$anser" == "yes" ]; then
59 echo ""
60 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
61 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
62 status
63 else
64 echo ""
65 echo "Leaving /bin/sh to : $sh"
66 fi
67 fi
68 }
70 # Restore a valid sh link if needed.
71 pre_remove()
72 {
73 sh=`readlink /bin/sh`
74 if [ ! "$sh" = "busybox" ]; then
75 rm /bin/sh &&
76 ln -s /bin/busybox /bin/sh
77 fi
78 }