wok-next annotate bash/receipt @ rev 13990
Up tazlito (5.1.1) fix writeiso
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 10 09:38:26 2013 +0100 (2013-02-10) |
parents | 8ad990dde0f8 |
children | 2b9f96603415 |
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 |
xfred222@13689 | 66 |
pankso@14 | 67 post_install() |
pankso@14 | 68 { |
pankso@14 | 69 local root |
pankso@14 | 70 root=$1 |
pankso@14 | 71 echo "Processing post-install commands..." |
xfred222@13689 | 72 echo -n "Do you want to set Bash to default (y/N) ? : " |
gokhlayeh@7635 | 73 read -t 30 anser |
xfred222@13689 | 74 if [ "$anser" == "y" ]; then |
pankso@14 | 75 echo "" |
xfred222@13689 | 76 echo "Setting bash as default for all users" |
xfred222@13689 | 77 sed -i "s/:\/bin\/sh$/:\/bin\/bash/g" /etc/passwd |
xfred222@13689 | 78 sed -i "s/:\/bin\/ksh$/:\/bin\/bash/g" /etc/passwd |
xfred222@13689 | 79 sed -i "s/:\/bin\/zsh$/:\/bin\/bash/g" /etc/passwd |
xfred222@13689 | 80 sed -i "s/:\/bin\/csh$/:\/bin\/bash/g" /etc/passwd |
xfred222@13689 | 81 echo "Creating .bashrc file for all users" |
xfred222@13689 | 82 for i in `ls -d /home/*` |
xfred222@13689 | 83 do |
xfred222@13689 | 84 cp /etc/bashrc $i/.bashrc |
xfred222@13689 | 85 done |
xfred222@13689 | 86 cp /etc/bashrc /root/.bashrc |
xfred222@13689 | 87 cp /etc/bashrc /etc/skel/.bashrc |
pankso@14 | 88 fi |
pankso@14 | 89 } |
pankso@2156 | 90 |
xfred222@13689 | 91 |
pankso@2156 | 92 pre_remove() |
pankso@2156 | 93 { |
slaxemulator@9610 | 94 local root |
slaxemulator@9610 | 95 root=$1 |
xfred222@13689 | 96 echo "Setting back sh as default for all users" |
xfred222@13689 | 97 sed -i "s/:\/bin\/bash$/:\/bin\/sh/g" /etc/passwd |
xfred222@13689 | 98 rm /etc/skel/.bashrc |
pankso@2156 | 99 } |