lfs-buildscripts/CH8Build/CH08.24-libcap.sh
2024-10-08 12:43:22 -07:00

41 lines
687 B
Bash

#!/bin/bash
source versions.sh
GLSOURCES="/sources"
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
[ -d libcap-${libcap_version} ] && rm -rf libcap-${libcap_version}
tar -Jxf ${libcap_tarball}
cd libcap-${libcap_version}
sed -i '/install -m.*STA/d' libcap/Makefile
make prefix=/usr lib=lib
if [ $? -ne 0 ]; then
myfail "Failed building libcap"
fi
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running libcap make test"
make test > ${GLSOURCES}/libcap.check.log 2>&1
fi
make prefix=/usr lib=lib install
if [ $? -ne 0 ]; then
myfail "Failed installing libcap"
fi
popd
# cleanup
pushd $GLSOURCES
rm -rf libcap-${libcap_version}
popd