wok annotate bash/receipt @ rev 13650

Up: slitaz-configs to 5.1.1. I made sure applications.conf was added.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Nov 18 18:16:33 2012 +0000 (2012-11-18)
parents e2c80c0bf72a
children 6b9560f1e886
rev   line source
pankso@14 1 # SliTaz package receipt.
pankso@14 2
pankso@14 3 PACKAGE="bash"
slaxemulator@8720 4 VERSION="4.2"
pankso@202 5 CATEGORY="system-tools"
pankso@14 6 SHORT_DESC="The GNU bourne SHell."
pankso@14 7 MAINTAINER="pankso@slitaz.org"
pankso@14 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@14 9 WEB_SITE="http://www.gnu.org/software/bash/"
pankso@14 10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@14 11
slaxemulator@10407 12 DEPENDS="readline"
slaxemulator@10407 13 BUILD_DEPENDS="readline bison"
slaxemulator@10407 14
gokhlayeh@8171 15 # Rules to compile & install the temporary toolchain.
gokhlayeh@8171 16 cook_tmp_toolchain()
gokhlayeh@8171 17 {
gokhlayeh@8171 18 cd $src
gokhlayeh@8171 19 ./configure --without-bash-malloc &&
gokhlayeh@8171 20 make && make install
gokhlayeh@8171 21 }
gokhlayeh@8171 22
pankso@14 23 # Rules to configure and make the package.
pankso@14 24 compile_rules()
pankso@14 25 {
pankso@14 26 # Patch and then build.
pankso@14 27 cd $src
pankso@10352 28 # Skip tests that can not run while cross-compiling.
pankso@10352 29 cat > config.cache << "EOF"
pankso@10352 30 ac_cv_func_mmap_fixed_mapped=yes
pankso@10352 31 ac_cv_func_strcoll_works=yes
pankso@10352 32 ac_cv_func_working_mktime=yes
pankso@10352 33 bash_cv_func_sigsetjmp=present
pankso@10352 34 bash_cv_getcwd_malloc=yes
pankso@10352 35 bash_cv_job_control_missing=present
pankso@10352 36 bash_cv_printf_a_format=yes
pankso@10352 37 bash_cv_sys_named_pipes=present
pankso@10352 38 bash_cv_ulimit_maxfds=yes
pankso@10352 39 bash_cv_under_sys_siglist=yes
pankso@10352 40 bash_cv_unusable_rtsigs=no
pankso@10352 41 gt_cv_int_divbyzero_sigfpe=yes
pankso@10352 42 EOF
pankso@10344 43 ./configure \
pankso@10352 44 $CONFIGURE_ARGS \
pankso@10352 45 --cache-file=config.cache \
pankso@10344 46 --bindir=/bin \
gokhlayeh@8171 47 --enable-history --enable-alias \
gokhlayeh@8171 48 --disable-nls --without-bash-malloc \
pankso@10344 49 --disable-help-builtin \
pankso@10344 50 --with-installed-readline &&
pascal@1553 51 make &&
gokhlayeh@8171 52 # Bash doesn't care about DESTDIR in environnment variable.
gokhlayeh@8171 53 make DESTDIR=$DESTDIR install
pankso@14 54 }
pankso@14 55
pankso@14 56 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@14 57 genpkg_rules()
pankso@14 58 {
pankso@14 59 cp -a $_pkg/bin $fs
pankso@14 60 # Config files.
pankso@14 61 #
pankso@14 62 mkdir $fs/etc
pankso@9697 63 cp $stuff/example.bashrc $fs/etc/bashrc
pankso@14 64 }
pankso@14 65
pankso@14 66 # Post install commands for Tazpkg.
pankso@14 67 # Check /bin/sh stat.
pankso@14 68 #
pankso@14 69 post_install()
pankso@14 70 {
pankso@14 71 local root
pankso@14 72 root=$1
pankso@14 73 echo "Processing post-install commands..."
pankso@14 74 sh=`readlink $root/bin/sh`
pankso@14 75 if [ ! "$sh" = "/bin/bash" ]; then
pankso@14 76 echo ""
pankso@14 77 echo "**** Actual SH link : $sh"
pankso@14 78 echo ""
gokhlayeh@7635 79 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
gokhlayeh@7635 80 read -t 30 anser
pankso@2300 81 if [ "$anser" == "yes" ]; then
pankso@14 82 echo ""
paul@2534 83 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
pankso@14 84 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
pankso@14 85 status
pankso@14 86 else
pankso@14 87 echo ""
pankso@14 88 echo "Leaving /bin/sh to : $sh"
pankso@14 89 fi
pankso@14 90 fi
pankso@14 91 }
pankso@2156 92
pankso@2156 93 # Restore a valid sh link if needed.
pankso@2156 94 pre_remove()
pankso@2156 95 {
slaxemulator@9610 96 local root
slaxemulator@9610 97 root=$1
slaxemulator@9610 98 sh=`readlink $root/bin/sh`
pankso@2156 99 if [ ! "$sh" = "busybox" ]; then
slaxemulator@9610 100 rm $root/bin/sh &&
slaxemulator@9610 101 ln -s /bin/busybox $root/bin/sh
pankso@2156 102 fi
pankso@2156 103 }