eth0s/toolchain/09-expect
2018-12-01 00:12:45 +08:00

42 lines
846 B
Bash
Executable file

#!/bin/bash -e
source $(dirname $0)/functions
source $(dirname $0)/pkgversion
filename=$(echo $0 | rev | cut -d / -f1 | rev)
TMP=${TMP:-/tmp/build}
LOG=${LOG:-$(dirname $0)/log}
SRC=${SRC:-$(dirname $0)/src}
NAME=expect
VERSION=${EXPECT_VER}
fetch "https://prdownloads.sourceforge.net/expect/expect$EXPECT_VER.tar.gz" $SRC
[ "$1" = "fetch" ] && exit 0
rm -fr $TMP
mkdir -p $TMP $LOG $SRC
tar xf $SRC/$tarballname -C $TMP
{ time \
{
cd $TMP/${NAME}${VERSION}
cp -v configure{,.orig}
sed 's:/usr/local/bin:/bin:' configure.orig > configure
./configure --prefix=/tools \
--with-tcl=/tools/lib \
--with-tclinclude=/tools/include
make
make SCRIPTS="" install
}
} 2>&1 | tee $LOG/$filename.log
[ $PIPESTATUS = 0 ] && echo "$NAME-$VERSION" > /tools/$filename || exit $PIPESTATUS
rm -fr $TMP