wok-current view bash/receipt @ rev 17920

Up kbd, kbd-base; move setfont from kbd to kbd-base. Note, keymap "fi-latin1" changed to "fi" with update.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Apr 10 16:21:42 2015 +0300 (2015-04-10)
parents dfef8de3d270
children eafc174e124b
line source
1 # SliTaz package receipt.
3 PACKAGE="bash"
4 VERSION="4.3.30"
5 BASEVERSION="${VERSION%.*}"
6 CATEGORY="system-tools"
7 SHORT_DESC="The GNU bourne SHell."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="GPL3"
10 TARBALL="$PACKAGE-$BASEVERSION.tar.gz"
11 WEB_SITE="http://www.gnu.org/software/bash/"
12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
13 BASHCHECKURL="https://raw.githubusercontent.com/hannob/bashcheck/master/bashcheck"
14 BASHCHECK="$(basename $BASHCHECKURL)"
15 BASHPATCHES="$(for i in $(seq 1 ${VERSION##*.}); do printf "bash${BASEVERSION/./}-%03d " $i; done)"
16 EXTRA_SOURCE_FILES="$BASHCHECK $BASHPATCHES"
18 DEPENDS="readline"
19 BUILD_DEPENDS="readline bison wget texinfo"
21 patch_bash()
22 {
23 for i in $BASHPATCHES ; do
24 [ -s "$SOURCES_REPOSITORY/$i" ] ||
25 wget -O "$SOURCES_REPOSITORY/$i" \
26 http://ftp.gnu.org/gnu/bash/bash-$BASEVERSION-patches/$i
27 echo "Apply $i ..."
28 patch -p0 < $SOURCES_REPOSITORY/$i
29 done
30 }
32 # Rules to compile & install the temporary toolchain.
33 cook_tmp_toolchain()
34 {
35 cd $src
36 patch_bash
37 ./configure --without-bash-malloc &&
38 make && make install
39 }
41 # Rules to configure and make the package.
42 compile_rules()
43 {
44 # Patch and then build.
45 cd $src
46 patch_bash
47 # Skip tests that can not run while cross-compiling.
48 cat > config.cache << "EOF"
49 ac_cv_func_mmap_fixed_mapped=yes
50 ac_cv_func_strcoll_works=yes
51 ac_cv_func_working_mktime=yes
52 bash_cv_func_sigsetjmp=present
53 bash_cv_getcwd_malloc=yes
54 bash_cv_job_control_missing=present
55 bash_cv_printf_a_format=yes
56 bash_cv_sys_named_pipes=present
57 bash_cv_ulimit_maxfds=yes
58 bash_cv_under_sys_siglist=yes
59 bash_cv_unusable_rtsigs=no
60 gt_cv_int_divbyzero_sigfpe=yes
61 EOF
62 ./configure \
63 $CONFIGURE_ARGS \
64 --cache-file=config.cache \
65 --bindir=/bin \
66 --enable-history --enable-alias \
67 --disable-nls --without-bash-malloc \
68 --disable-help-builtin \
69 --with-installed-readline &&
70 make &&
71 # Bash doesn't care about DESTDIR in environnment variable.
72 make DESTDIR=$DESTDIR install
73 [ -s "$SOURCES_REPOSITORY/$BASHCHECK" ] ||
74 wget --no-check-certificate -O "$SOURCES_REPOSITORY/$BASHCHECK" $BASHCHECKURL
75 $DESTDIR/bin/bash $SOURCES_REPOSITORY/$BASHCHECK $DESTDIR/bin/bash | tee bashcheck.log
76 grep Vulnerable bashcheck.log && echo "ERROR: Vulnerable"
77 }
79 # Rules to gen a SliTaz package suitable for Tazpkg.
80 genpkg_rules()
81 {
82 cp -a $install/bin $fs
83 # Config files.
84 #
85 mkdir $fs/etc
86 cp $stuff/example.bashrc $fs/etc/bashrc
87 }
90 post_install()
91 {
92 echo "Processing post-install commands..."
93 echo -n "Do you want to set Bash to default (y/N) ? : "
94 read -t 30 anser
95 if [ "$anser" == "y" ]; then
96 echo ""
97 echo "Setting bash as default for all users"
98 sed -i "s/:\/bin\/sh$/:\/bin\/bash/g" $1/etc/passwd
99 sed -i "s/:\/bin\/ksh$/:\/bin\/bash/g" $1/etc/passwd
100 sed -i "s/:\/bin\/zsh$/:\/bin\/bash/g" $1/etc/passwd
101 sed -i "s/:\/bin\/csh$/:\/bin\/bash/g" $1/etc/passwd
102 echo "Creating .bashrc file for all users"
103 for i in `ls -d $1/home/*`
104 do
105 cp $1/etc/bashrc $1$i/.bashrc
106 done
107 cp $1/etc/bashrc $1/root/.bashrc
108 cp $1/etc/bashrc $1/etc/skel/.bashrc
109 fi
110 }
113 pre_remove()
114 {
115 echo "Setting back sh as default for all users"
116 sed -i "s/:\/bin\/bash$/:\/bin\/sh/g" $1/etc/passwd
117 if [ -f $1/etc/skel/.bashrc ]; then
118 rm $1/etc/skel/.bashrc
119 fi
120 }