1 # Build recipe for GNU bash.
3 # Copyright (c) 2016-2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/shells"
24 tarname=${program}-${version}.tar.gz
27 fetch=ftp://ftp.gnu.org/gnu/bash/$tarname
30 The Bourne Again SHell.
32 Bash is an sh-compatible shell that incorporates useful features from
33 the Korn shell (ksh) and C shell (csh). It is intended to conform to
34 the IEEE POSIX P1003.2/ISO 9945.2 shell and tools standard.
36 It offers functional improvements over sh for both programming and
40 homepage=http://www.gnu.org/software/bash
43 # Source documentation
44 docsdir="${docdir}/${program}-${version}"
50 unpack "${tardir}/$tarname"
54 # Set sane permissions
55 chmod -R u+w,go-w,a+rX-s .
57 # Apply patches from upstream
58 for file in "${worktree}"/patches/bash/bash50-???*
66 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
69 --libdir=/usr/lib${libSuffix} \
73 --enable-static-link \
76 --with-installed-readline \
77 --without-bash-malloc \
78 --build="$(cc -dumpmachine)"
81 make -j${jobs} DESTDIR="$destdir" install
83 # Compress info documents deleting index file for the package
84 if test -d "${destdir}/$infodir"
86 rm -f "${destdir}/${infodir}/dir"
87 lzip -9 "${destdir}/${infodir}"/*
90 # Compress and link man pages (if needed)
91 if test -d "${destdir}/$mandir"
94 cd "${destdir}/$mandir"
95 find . -type f -exec lzip -9 '{}' +
96 find . -type l | while read -r file
98 ln -sf "$(readlink -- "$file").lz" "${file}.lz"