pkgs/bash/PKGBUILD

66 lines
1.9 KiB
Bash

# Maintainer: Daryl Ronningen <relms@relms.dev>
pkgname=bash
pkgver=5.2.21
pkgrel=1
pkgdesc="The GNU Bourne Again shell"
arch=("x86_64")
url="https://www.gnu.org/software/bash/bash.html"
license=("GPL-3.0")
depends=("ncurses" "readline")
optdepends=("bash-completion: for tab completion")
provides=("sh")
backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
install=bash.install
source=(
"https://ftp.gnu.org/gnu/bash/bash-$pkgver.tar.gz"
"dot.bashrc"
"dot.bash_profile"
"dot.bash_logout"
"system.bashrc"
"system.bash_logout"
)
sha256sums=(
"c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8"
"959bc596166c9758fdd68836581f6b8f1d6fdb947d580bf24dce607998a077b8"
"e149407c2bee17779caec70a7edd3d0000d172e7e4347429b80cb4d55bcec9c2"
"4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5"
"51ceca7cd615ff4e2f8f3373a46ac7bfd453be70bbaddc074cb17f6db1ac7370"
"025bccfb374a3edce0ff8154d990689f30976b78f7a932dc9a6fcef81821811e"
)
build() {
cd $pkgname-$pkgver
_bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/bin\"\'
-DSTANDARD_UTILS_PATH=\'\"/usr/bin\"\'
-DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
-DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\'
-DNON_INTERACTIVE_LOGIN_SHELLS)
export CFLAGS="$CFLAGS ${_bashconfig[@]}"
./configure \
--prefix=/usr \
--with-curses \
--enable-readline \
--without-bash-malloc \
--with-installed-readline
make
}
package() {
make -C $pkgname-$pkgver DESTDIR=$pkgdir install
ln -s bash $pkgdir/usr/bin/sh
ln -s bash $pkgdir/usr/bin/rbash
# system-wide configuration files
install -Dm644 system.bashrc $pkgdir/etc/bash.bashrc
install -Dm644 system.bash_logout $pkgdir/etc/bash.bash_logout
# user configuration file skeletons
install -dm755 $pkgdir/etc/skel/
install -m644 dot.bashrc $pkgdir/etc/skel/.bashrc
install -m644 dot.bash_profile $pkgdir/etc/skel/.bash_profile
install -m644 dot.bash_logout $pkgdir/etc/skel/.bash_logout
}