wok-6.x view bash/receipt @ rev 9026

gtkperf: fix genpkg_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 03 22:08:34 2011 +0100 (2011-03-03)
parents fa7b7514e1d8
children 02bbaa9d12ba
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 strip -s $fs/bin/bash
41 # Config files.
42 #
43 mkdir $fs/etc
44 cp stuff/example.bashrc $fs/etc/bashrc
45 }
47 # Post install commands for Tazpkg.
48 # Check /bin/sh stat.
49 #
50 post_install()
51 {
52 local root
53 root=$1
54 echo "Processing post-install commands..."
55 sh=`readlink $root/bin/sh`
56 if [ ! "$sh" = "/bin/bash" ]; then
57 echo ""
58 echo "**** Actual SH link : $sh"
59 echo ""
60 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
61 read -t 30 anser
62 if [ "$anser" == "yes" ]; then
63 echo ""
64 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
65 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
66 status
67 else
68 echo ""
69 echo "Leaving /bin/sh to : $sh"
70 fi
71 fi
72 }
74 # Restore a valid sh link if needed.
75 pre_remove()
76 {
77 sh=`readlink /bin/sh`
78 if [ ! "$sh" = "busybox" ]; then
79 rm /bin/sh &&
80 ln -s /bin/busybox /bin/sh
81 fi
82 }