mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 11:04:37 +08:00
94 lines
2.7 KiB
Bash
94 lines
2.7 KiB
Bash
#
|
|
# Core Packages for Chakra, part of chakraos.org
|
|
#
|
|
|
|
pkgname=bash
|
|
_basever=4.4
|
|
_patchlevel=005 #prepare for some patches
|
|
pkgver=$_basever.$_patchlevel
|
|
pkgrel=1
|
|
pkgdesc="The GNU Bourne Again shell"
|
|
arch=('x86_64')
|
|
license=('GPL')
|
|
url="http://www.gnu.org/software/bash/bash.html"
|
|
groups=('base')
|
|
backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
|
|
depends=('readline>=6.3' 'glibc')
|
|
optdepends=('bash-completion: for tab completion')
|
|
provides=('sh')
|
|
install=bash.install
|
|
source=(https://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}
|
|
dot.bashrc
|
|
dot.bash_profile
|
|
dot.bash_logout
|
|
system.bashrc
|
|
system.bash_logout)
|
|
validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
|
|
|
|
if [[ $((10#${_patchlevel})) -gt 0 ]]; then
|
|
for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
|
|
source=(${source[@]} http://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//.}-$(printf "%03d" $_p))
|
|
done
|
|
fi
|
|
|
|
prepare() {
|
|
cd $pkgname-$_basever
|
|
|
|
for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
|
|
msg "applying patch bash${_basever//.}-$(printf "%03d" $_p)"
|
|
patch -p0 -i ../bash${_basever//.}-$(printf "%03d" $_p)
|
|
done
|
|
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$_basever
|
|
|
|
_bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin\"\'
|
|
-DSTANDARD_UTILS_PATH=\'\"/usr/bin:/usr/sbin\"\'
|
|
-DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
|
|
-DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\')
|
|
export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
|
|
|
|
./configure --prefix=/usr --with-curses --enable-readline \
|
|
--without-bash-malloc --with-installed-readline
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd $pkgname-$_basever
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$_basever
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
ln -s bash ${pkgdir}/usr/bin/sh
|
|
|
|
install -dm755 ${pkgdir}/etc/skel/
|
|
# system-wide configuration files
|
|
install -m644 ${srcdir}/system.bashrc ${pkgdir}/etc/bash.bashrc
|
|
install -m644 ${srcdir}/system.bash_logout ${pkgdir}/etc/bash.bash_logout
|
|
|
|
# user configuration file skeletons
|
|
install -m644 ${srcdir}/dot.bashrc ${pkgdir}/etc/skel/.bashrc
|
|
install -m644 ${srcdir}/dot.bash_profile ${pkgdir}/etc/skel/.bash_profile
|
|
install -m644 ${srcdir}/dot.bash_logout ${pkgdir}/etc/skel/.bash_logout
|
|
}
|
|
|
|
|
|
md5sums=('148888a7c95ac23705559b6f477dfe25'
|
|
'SKIP'
|
|
'7b50480e812f4b2bbbec8ba45608da54'
|
|
'2902e0fee7a9168f3a4fd2ccd60ff047'
|
|
'42f4400ed2314bd7519c020d0187edc5'
|
|
'3546099a1b2f667adc9794f52e78e35b'
|
|
'472f536d7c9e8250dc4568ec4cfaf294'
|
|
'817d01a6c0af6f79308a8b7b649e53d8'
|
|
'765e14cff12c7284009772e8e24f2fe0'
|
|
'49e7da93bf07f510a2eb6bb43ac3e5a2'
|
|
'4557d674ab5831a5fa98052ab19edaf4'
|
|
'cce96dd77cdd1d293beec10848f6cbb5')
|
|
|