mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
35 lines
1.2 KiB
Makefile
35 lines
1.2 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2016-2020 Team LibreELEC
|
|
# Copyright (C) 2020-present 351ELEC (https://github.com/351ELEC)
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
|
|
|
PKG_NAME="bash"
|
|
PKG_VERSION="5.3"
|
|
PKG_LICENSE="GPL"
|
|
PKG_SITE="http://www.gnu.org/software/bash/"
|
|
PKG_URL="https://mirrors.kernel.org/gnu/bash/${PKG_NAME}-${PKG_VERSION}.tar.gz"
|
|
PKG_DEPENDS_TARGET="toolchain ncurses readline"
|
|
PKG_LONGDESC="The GNU Bourne Again shell."
|
|
|
|
PKG_CONFIGURE_OPTS_TARGET="--with-curses \
|
|
--enable-readline \
|
|
--without-bash-malloc \
|
|
--with-installed-readline"
|
|
|
|
pre_configure_target() {
|
|
export CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -std=gnu17"
|
|
# Shared libreadline needs ncurses termcap symbols (BC, UP, tputs, etc.)
|
|
# --no-as-needed forces ncursesw to be kept even though bash doesn't use it directly
|
|
export LDFLAGS="${LDFLAGS} -Wl,--no-as-needed -lncursesw -Wl,--as-needed"
|
|
}
|
|
|
|
post_install() {
|
|
ln -sf bash ${INSTALL}/usr/bin/sh
|
|
mkdir -p ${INSTALL}/etc
|
|
cat <<EOF >${INSTALL}/etc/shells
|
|
/usr/bin/bash
|
|
/usr/bin/sh
|
|
EOF
|
|
chmod 4755 ${INSTALL}/usr/bin/bash
|
|
}
|