VERSION=1.14.7 BUILD=2 ARCH=i386 TAG=REC PKGNAME=bash1-$VERSION-$ARCH-$BUILD MAINTAINER="David Cantrell " IGNOREPATH=/tmp:/proc:/dev:/root:/var:/a:/home STRIPLIB=y STRIPBIN=y PROGNAME="GNU bash" DESC="\ GNU bash-$VERSION\n\ \n\ The GNU Bourne-Again SHell. Bash is a sh-compatible command\n\ interpreter that executes commands read from the standard input or\n\ from a file. Bash also incorporates useful features from the Korn\n\ and C shells (ksh and csh). Bash is ultimately intended to be a\n\ conformant implementation of the IEEE Posix Shell and Tools\n\ specification (IEEE Working Group 1003.2).\n\ \n\ Some older scripts may need /bin/bash1 instead of /bin/bash." compile() { # make sure we have egcs on the system if [ ! -x /usr/bin/egcs ] then echo echo "HALT: You must have egcs-1.1.2 installed to compile bash-$VERSION." echo rm -rf $TMP exit fi # build bash tar xvzf $CWD/bash-$VERSION.tar.gz cd bash-$VERSION zcat $CWD/bash-$VERSION.diff.gz | patch -p1 make CFLAGS=-O2 LDFLAGS=-s CC=/usr/bin/egcs strip bash } install() { # we only install documentation here mkdir -p /usr/doc/bash-$VERSION cp NEWS README RELEASE COPYING /usr/doc/bash-$VERSION cd documentation cp article.txt /usr/doc/bash-$VERSION cat bash.1 | gzip -9c > /usr/man/man1/bash1.1.gz cat builtins.1 | gzip -9c > /usr/man/man1/builtins1.1.gz cat features.info | gzip -9c > /usr/info/features.info.gz } special() { # install the binary mkdir -p $PKG/bin cat $TMP/bash-$VERSION/bash > $PKG/bin/bash1 chown root.bin $PKG/bin/bash1 chown root.bin $PKG/bin chmod 755 $PKG/bin/bash1 # add the shell installation block to the doinst mkdir -p $CTL cd $CTL cat <<"EOF">> doinst.sh.incoming # backup the old shell and install the new one if [ -r bin/bash1 ] then mv bin/bash1 bin/bash1.old fi if [ "`grep '/bin/bash1' etc/shells 2>/dev/null`" = "" ] then echo "/bin/bash1" >> etc/shells fi EOF cat doinst.sh.incoming doinst.sh > aaa.sh rm -f doinst.sh.incoming rm -f doinst.sh mv aaa.sh doinst.sh # put the old asm symlink back in place rm -f /usr/include/asm mv /usr/include/asm.BEFORE_BASH_BUILD /usr/include/asm }