mirror of
https://github.com/YellowJacketLinux/lfs-buildscripts.git
synced 2025-01-23 14:32:20 +08:00
45 lines
631 B
Bash
45 lines
631 B
Bash
#!/bin/bash
|
|
|
|
source versions.sh
|
|
|
|
GLSOURCES="/sources"
|
|
|
|
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
|
|
|
[ -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
|
|
|
|
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
|
|
echo "Running zlib make check."
|
|
make check > ${GLSOURCES}/zlib.check.log 2>&1
|
|
fi
|
|
|
|
make install
|
|
|
|
if [ $? -ne 0 ]; then
|
|
myfail "Failed installing zlib"
|
|
fi
|
|
|
|
rm -f /usr/lib/libz.a
|
|
|
|
popd
|
|
|
|
# cleanup
|
|
|
|
pushd $GLSOURCES
|
|
|
|
rm -rf zlib-${zlib_version}
|
|
|
|
popd
|