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