Core/bash/PKGBUILD
2024-09-07 23:18:11 +08:00

88 lines
2.8 KiB
Bash

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=bash
pkgver=5.2.32
pkgrel=1
pkgdesc="The GNU Bourne Again shell"
arch=('x86_64')
url="https://www.gnu.org/software/bash/"
license=('GPL-3.0-or-later')
groups=('base')
depends=('glibc' 'readline' 'ncurses')
backup=(etc/{bashrc,profile,shells}
etc/profile.d/{bash_completion,dircolors,extrapaths,i18n,readline,umask}.sh
etc/skel/.bash{rc,_profile,_logout})
source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz
bash_completion.sh
bashrc
dircolors.sh
extrapaths.sh
i18n.sh
profile
readline.sh
shells
skel_bash_logout
skel_bash_profile
skel_bashrc
umask.sh)
sha256sums=(d3ef80d2b67d8cbbe4d3265c63a72c46f9b278ead6e0e06d61801b58f23f50b5
c3358ba9f1ad54255a6960236b092e32c5077f658385a9d11dd46ca73f18ad2b
456936d471ac420a3dc10dfeee631c80579cee432802a29113c53f7e39d679bc
1c8ce873176834ecf414926bd3b4f7ae42df4065c10d9c503bc6f38894253c29
33d9fe6dcff46760cd8a1f900cbc8b25b648261bee66af0caccdcaa1043d2623
04ddf9afa78ff75ad3f4e05fe4c86f4795a7aaeabb5f1f85f2d820b76b4b88e8
3488e7c0b739193c0c4a2dafa660ff74fd0fcd53aa5b09773afe77216fd828a6
515a7a055ca3a3903c53c1b1a313eb3b5fa6bfbb70017472e5ca413d3f3b391b
1db1de0b837e46cac525afad0b39b41e730114294b209a023f2e7100a3efd2f7
0d3e7affb46fd79310d2d0b8ab63cdfbf1b6fbf58fbb6cae786db5a8d62f9bfd
b96ceb11cf69051af9876f0a8f80a100a88208d95ff4244a9eb30f076b40c436
5b7693b9fe722063f4b2a6aece9ed71055edb3540b69d35038d27a8b17ee640f
6ffa96e2dca75701c2e36ae1566c3b3b7e53464960be9e4b75ba730526a200b3)
build() {
cd ${pkgname}-${pkgver}
${CONFIGURE} \
--without-bash-malloc \
--with-installed-readline \
bash_cv_strtold_broken=no \
--docdir=/usr/share/doc/${pkgname}-${pkgver}
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
ln -s bash ${pkgdir}/usr/bin/sh
install --directory --mode=0755 --owner=root --group=root ${pkgdir}/etc/profile.d
install --directory --mode=0755 --owner=root --group=root ${pkgdir}/etc/bash_completion.d
for file in {bash_completion,dircolors,extrapaths,readline,umask,i18n}.sh
do
install -vm644 ${srcdir}/${file} ${pkgdir}/etc/profile.d/${file}
done
install -vDm644 ${srcdir}/bashrc ${pkgdir}/etc/bashrc
install -vDm644 ${srcdir}/profile ${pkgdir}/etc/profile
install -vDm644 ${srcdir}/shells ${pkgdir}/etc/shells
install -dv -m 0750 ${pkgdir}/root
for file_skel in skel_bash{rc,_profile,_logout}
do
install -vDm644 ${srcdir}/${file_skel} ${pkgdir}/etc/skel/.${file_skel#*_}
done
dircolors -p > ${pkgdir}/etc/dircolors
}