lfs-buildscripts/CH8Build/CH08.78-util-linux.sh

59 lines
1.2 KiB
Bash
Raw Normal View History

2024-10-07 10:06:37 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 09:50:04 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-07 10:06:37 +08:00
[ -d util-linux-${util_linux_version} ] && rm -rf util-linux-${util_linux_version}
tar -Jxf ${util_linux_tarball}
cd util-linux-${util_linux_version}
./configure --bindir=/usr/bin \
--libdir=/usr/lib \
--runstatedir=/run \
--sbindir=/usr/sbin \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser \
--disable-pylibmount \
--disable-liblastlog2 \
--disable-static \
--without-python \
ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-${util_linux_version}
make
if [ $? -ne 0 ]; then
myfail "Failed building util-linux"
fi
2024-10-09 09:50:04 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running util-linux make check"
touch /etc/fstab
chown -R tester .
su tester -c "make -k check > util-linux.check.log"
mv util-linux.check.log ${GLSOURCES}/
fi
2024-10-07 10:06:37 +08:00
make install
if [ $? -ne 0 ]; then
myfail "Failed installing util-linux"
fi
2024-10-08 14:49:09 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf util-linux-${util_linux_version}
popd