lfs-buildscripts/CH8Build/CH08.15-expect.sh

50 lines
863 B
Bash
Raw Normal View History

2024-10-04 17:51:59 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 03:11:06 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-04 17:51:59 +08:00
[ -d expect${expect_version} ] && rm -rf expect${expect_version}
tar -zxf ${expect_tarball}
cd expect${expect_version}
patch -Np1 -i ../${expect_patch_file}
./configure --prefix=/usr \
--with-tcl=/usr/lib \
--enable-shared \
--disable-rpath \
--mandir=/usr/share/man \
--with-tclinclude=/usr/include
make
if [ $? -ne 0 ]; then
myfail "Failed building expect"
fi
2024-10-09 03:11:06 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running expect make test"
make test > ${GLSOURCES}/expect.check.log 2>&1
fi
2024-10-04 17:51:59 +08:00
make install
if [ $? -ne 0 ]; then
myfail "Failed installing expect"
fi
ln -svf expect${expect_version}/libexpect${expect_version}.so /usr/lib
2024-10-08 12:28:55 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf expect${expect_version}
popd