aboutsummaryrefslogtreecommitdiff
path: root/extra/bash/build
blob: 2daea242253c0539a3b6243df331cebd6314cc1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh -e

for patch in bash51-0??; do
    patch -p0 < "$patch"
done

# Even with '--disable-nls', bash build fails if gettext-tiny is available
# on the system. We can completely disable it, by adding the "--with-included"
# gettext flag
./configure \
    --prefix=/usr \
    --without-bash-malloc \
    --disable-nls \
    --with-included-gettext

export MAKEFLAGS="TERMCAP_LIB=/usr/lib/libncursesw.a $MAKEFLAGS"

make
make DESTDIR="$1" install

ln -s bash "$1/usr/bin/sh"

# Remove bash C header files. I couldn't find an actual example of how these
# can be useful to someone. If you can think of one, and do need it, send me a
# mail and I will think about adding them back if it makes sense to me.
# Otherwise, you can remove this part through a hook or a fork.
rm -rf "$1/usr/include"