lfs-buildscripts/CH8Build/CH08.04-zlib.sh

45 lines
631 B
Bash
Raw Normal View History

2024-10-04 13:59:46 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 02:37:48 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-04 13:59:46 +08:00
[ -d zlib-${zlib_version} ] && rm -rf zlib-${zlib_version}
tar -zxf ${zlib_tarball}
cd zlib-${zlib_version}
./configure --prefix=/usr
make
if [ $? -ne 0 ]; then
myfail "Failed building zlib"
fi
2024-10-09 02:37:48 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "Running zlib make check."
make check > ${GLSOURCES}/zlib.check.log 2>&1
fi
2024-10-04 13:59:46 +08:00
make install
if [ $? -ne 0 ]; then
myfail "Failed installing zlib"
fi
rm -f /usr/lib/libz.a
2024-10-08 12:28:55 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf zlib-${zlib_version}
popd