wok-4.x view bash/receipt @ rev 7656
linux: fix linux WITH modules...
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Dec 15 23:52:20 2010 +0100 (2010-12-15) |
parents | 8b1a253d2a0e |
children | 20ec1b757fe7 |
line source
1 # SliTaz package receipt.
3 PACKAGE="bash"
4 VERSION="4.0"
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
18 [ -f done.bash32-025.patch ] ||
19 busybox patch -p1 -i ../stuff/bash32-025.patch
20 touch done.bash32-025.patch
21 ./configure --prefix=/usr --bindir=/bin \
22 --enable-history --enable-alias \
23 --disable-nls --without-bash-malloc \
24 --disable-help-builtin \
25 --infodir=/usr/share/info --mandir=/usr/share/man \
26 $CONFIGURE_ARGS &&
27 make &&
28 make DESTDIR=$PWD/_pkg install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 cp -a $_pkg/bin $fs
35 strip -s $fs/bin/bash
36 # Config files.
37 #
38 mkdir $fs/etc
39 cp stuff/example.bashrc $fs/etc/bashrc
40 }
42 # Post install commands for Tazpkg.
43 # Check /bin/sh stat.
44 #
45 post_install()
46 {
47 local root
48 root=$1
49 echo "Processing post-install commands..."
50 sh=`readlink $root/bin/sh`
51 if [ ! "$sh" = "/bin/bash" ]; then
52 echo ""
53 echo "**** Actual SH link : $sh"
54 echo ""
55 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
56 read -t 30 anser
57 if [ "$anser" == "yes" ]; then
58 echo ""
59 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
60 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
61 status
62 else
63 echo ""
64 echo "Leaving /bin/sh to : $sh"
65 fi
66 fi
67 }
69 # Restore a valid sh link if needed.
70 pre_remove()
71 {
72 sh=`readlink /bin/sh`
73 if [ ! "$sh" = "busybox" ]; then
74 rm /bin/sh &&
75 ln -s /bin/busybox /bin/sh
76 fi
77 }