wok view bash/receipt @ rev 15669
iptables: rm *.pc files, mv bin files to /usr/sbin
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Wed Dec 18 00:14:55 2013 +0000 (2013-12-18) |
parents | 2b9f96603415 |
children | b5a7e88f4bf6 |
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 LICENSE="GPL3"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.gnu.org/software/bash/"
11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
13 DEPENDS="readline"
14 BUILD_DEPENDS="readline bison"
16 # Rules to compile & install the temporary toolchain.
17 cook_tmp_toolchain()
18 {
19 cd $src
20 ./configure --without-bash-malloc &&
21 make && make install
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 # Patch and then build.
28 cd $src
29 # Skip tests that can not run while cross-compiling.
30 cat > config.cache << "EOF"
31 ac_cv_func_mmap_fixed_mapped=yes
32 ac_cv_func_strcoll_works=yes
33 ac_cv_func_working_mktime=yes
34 bash_cv_func_sigsetjmp=present
35 bash_cv_getcwd_malloc=yes
36 bash_cv_job_control_missing=present
37 bash_cv_printf_a_format=yes
38 bash_cv_sys_named_pipes=present
39 bash_cv_ulimit_maxfds=yes
40 bash_cv_under_sys_siglist=yes
41 bash_cv_unusable_rtsigs=no
42 gt_cv_int_divbyzero_sigfpe=yes
43 EOF
44 ./configure \
45 $CONFIGURE_ARGS \
46 --cache-file=config.cache \
47 --bindir=/bin \
48 --enable-history --enable-alias \
49 --disable-nls --without-bash-malloc \
50 --disable-help-builtin \
51 --with-installed-readline &&
52 make &&
53 # Bash doesn't care about DESTDIR in environnment variable.
54 make DESTDIR=$DESTDIR install
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 genpkg_rules()
59 {
60 cp -a $install/bin $fs
61 # Config files.
62 #
63 mkdir $fs/etc
64 cp $stuff/example.bashrc $fs/etc/bashrc
65 }
68 post_install()
69 {
70 local root
71 root=$1
72 echo "Processing post-install commands..."
73 echo -n "Do you want to set Bash to default (y/N) ? : "
74 read -t 30 anser
75 if [ "$anser" == "y" ]; then
76 echo ""
77 echo "Setting bash as default for all users"
78 sed -i "s/:\/bin\/sh$/:\/bin\/bash/g" /etc/passwd
79 sed -i "s/:\/bin\/ksh$/:\/bin\/bash/g" /etc/passwd
80 sed -i "s/:\/bin\/zsh$/:\/bin\/bash/g" /etc/passwd
81 sed -i "s/:\/bin\/csh$/:\/bin\/bash/g" /etc/passwd
82 echo "Creating .bashrc file for all users"
83 for i in `ls -d /home/*`
84 do
85 cp /etc/bashrc $i/.bashrc
86 done
87 cp /etc/bashrc /root/.bashrc
88 cp /etc/bashrc /etc/skel/.bashrc
89 fi
90 }
93 pre_remove()
94 {
95 local root
96 root=$1
97 echo "Setting back sh as default for all users"
98 sed -i "s/:\/bin\/bash$/:\/bin\/sh/g" /etc/passwd
99 rm /etc/skel/.bashrc
100 }