userspace
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* bash — the Bourne Again SHell.
|
||||
*
|
||||
* Links the store readline (static, via ncurses) for line editing and
|
||||
* history. The sh link is distro-managed (busybox provides sh via ash).
|
||||
* The testsuite is long and interactive-hostile — check is omitted.
|
||||
*/
|
||||
package "bash" {
|
||||
const version = "5.3"
|
||||
const source = "https://ftp.gnu.org/gnu/bash/bash-${version}.tar.gz"
|
||||
sha256 = "0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba"
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
provides = ["bash"]
|
||||
|
||||
depends = [
|
||||
{ name = "readline" },
|
||||
{ name = "ncurses" },
|
||||
{ name = "make" },
|
||||
]
|
||||
|
||||
prepare {
|
||||
curl -L -o bash-${version}.tar.gz ${source}
|
||||
echo "0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba bash-${version}.tar.gz" | sha256sum -c -
|
||||
tar xf bash-${version}.tar.gz --strip-components=1
|
||||
ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/readline/destdir/usr ]; then echo $ROOT/temp/readline/destdir/usr; else echo $ROOT/bin/$(grep '^readline ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr; fi > readline.path; if [ -d $ROOT/temp/ncurses/destdir/usr ]; then echo $ROOT/temp/ncurses/destdir/usr; else echo $ROOT/bin/$(grep '^ncurses ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr; fi > ncurses.path
|
||||
// multi-flag CPPFLAGS/LDFLAGS as files: a bare "VAR=-I.. -I.." line
|
||||
// makes the shell treat the second flag as a command.
|
||||
echo -I$(cat readline.path)/include -I$(cat ncurses.path)/include > cppflags.txt
|
||||
echo -L$(cat readline.path)/lib -L$(cat ncurses.path)/lib > ldflags.txt
|
||||
}
|
||||
|
||||
build {
|
||||
CPPFLAGS=$(cat cppflags.txt) LDFLAGS=$(cat ldflags.txt) ./configure --prefix=${prefix}
|
||||
make -j${jobs}
|
||||
}
|
||||
|
||||
install {
|
||||
make DESTDIR=${destdir} install
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user