wok-next view bash/receipt @ rev 10359
youtube-dl: Use $SOURCE_REPOSITORY.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun May 22 17:45:43 2011 +0000 (2011-05-22) |
parents | 704c6dd3e3ab |
children | 8ad990dde0f8 |
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 DEPENDS="readline"
9 BUILD_DEPENDS="readline bison"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.gnu.org/software/bash/"
12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
14 # Rules to compile & install the temporary toolchain.
15 cook_tmp_toolchain()
16 {
17 cd $src
18 ./configure --without-bash-malloc &&
19 make && make install
20 }
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 # Patch and then build.
26 cd $src
27 # Skip tests that can not run while cross-compiling.
28 cat > config.cache << "EOF"
29 ac_cv_func_mmap_fixed_mapped=yes
30 ac_cv_func_strcoll_works=yes
31 ac_cv_func_working_mktime=yes
32 bash_cv_func_sigsetjmp=present
33 bash_cv_getcwd_malloc=yes
34 bash_cv_job_control_missing=present
35 bash_cv_printf_a_format=yes
36 bash_cv_sys_named_pipes=present
37 bash_cv_ulimit_maxfds=yes
38 bash_cv_under_sys_siglist=yes
39 bash_cv_unusable_rtsigs=no
40 gt_cv_int_divbyzero_sigfpe=yes
41 EOF
42 ./configure \
43 $CONFIGURE_ARGS \
44 --cache-file=config.cache \
45 --bindir=/bin \
46 --enable-history --enable-alias \
47 --disable-nls --without-bash-malloc \
48 --disable-help-builtin \
49 --with-installed-readline &&
50 make &&
51 # Bash doesn't care about DESTDIR in environnment variable.
52 make DESTDIR=$DESTDIR install
53 }
55 # Rules to gen a SliTaz package suitable for Tazpkg.
56 genpkg_rules()
57 {
58 cp -a $_pkg/bin $fs
59 # Config files.
60 #
61 mkdir $fs/etc
62 cp $stuff/example.bashrc $fs/etc/bashrc
63 }
65 # Post install commands for Tazpkg.
66 # Check /bin/sh stat.
67 #
68 post_install()
69 {
70 local root
71 root=$1
72 echo "Processing post-install commands..."
73 sh=`readlink $root/bin/sh`
74 if [ ! "$sh" = "/bin/bash" ]; then
75 echo ""
76 echo "**** Actual SH link : $sh"
77 echo ""
78 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
79 read -t 30 anser
80 if [ "$anser" == "yes" ]; then
81 echo ""
82 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
83 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
84 status
85 else
86 echo ""
87 echo "Leaving /bin/sh to : $sh"
88 fi
89 fi
90 }
92 # Restore a valid sh link if needed.
93 pre_remove()
94 {
95 local root
96 root=$1
97 sh=`readlink $root/bin/sh`
98 if [ ! "$sh" = "busybox" ]; then
99 rm $root/bin/sh &&
100 ln -s /bin/busybox $root/bin/sh
101 fi
102 }