2024-10-04 15:20:13 +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 15:20:13 +08:00
|
|
|
|
|
|
|
[ -d zstd-${zstd_version} ] && rm -rf zstd-${zstd_version}
|
|
|
|
|
|
|
|
tar -zxf ${zstd_tarball}
|
|
|
|
|
|
|
|
cd zstd-${zstd_version}
|
|
|
|
|
|
|
|
make prefix=/usr
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed building zstd"
|
|
|
|
fi
|
|
|
|
|
2024-10-09 02:37:48 +08:00
|
|
|
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
|
|
|
|
echo "running zstd make check"
|
|
|
|
make check > ${GLSOURCES}/zstd.check.log 2>&1
|
|
|
|
fi
|
2024-10-04 15:20:13 +08:00
|
|
|
|
|
|
|
make prefix=/usr install
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed installing zstd"
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -f /usr/lib/libzstd.a
|
2024-10-08 12:28:55 +08:00
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
# cleanup
|
|
|
|
|
|
|
|
pushd $GLSOURCES
|
|
|
|
|
|
|
|
rm -rf zstd-${zstd_version}
|
|
|
|
|
|
|
|
popd
|