#!/bin/bash

cd $BLDDIR
rm -rf coreutils-$COREUTILS_VER
tar -xf $SRCDIR/coreutils-$COREUTILS_VER.tar.gz
cd coreutils-$COREUTILS_VER

touch man/uname.1 man/hostname.1
cat > config.cache << EOF
fu_cv_sys_stat_statfs2_bsize=yes
gl_cv_func_rename_trailing_slash_bug=no
gl_cv_func_working_mkstemp=yes
EOF

./configure --prefix=/tools \
    --build=${CHFS_HOST} --host=${CHFS_TARGET} \
    --enable-install-program=hostname --cache-file=config.cache
make
make install

cd $ROOT
