wok view bash/receipt @ rev 5674

Add gammu (control cell phone lib)
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 30 19:13:51 2010 +0200 (2010-05-30)
parents 52b7909de402
children 152a1f9dc01a
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) ? : "; read anser
56 if [ "$anser" == "yes" ]; then
57 echo ""
58 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
59 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
60 status
61 else
62 echo ""
63 echo "Leaving /bin/sh to : $sh"
64 fi
65 fi
66 }
68 # Restore a valid sh link if needed.
69 pre_remove()
70 {
71 sh=`readlink /bin/sh`
72 if [ ! "$sh" = "busybox" ]; then
73 rm /bin/sh &&
74 ln -s /bin/busybox /bin/sh
75 fi
76 }