#!/bin/bash
cd $LFS/usr/src/util-linux-*/ ||exit

patch -p 1 <../util-linux-2.12h-mount_move-1.patch
patch -p 1 <../util-linux-2.12p-blkid_mount_sec_type_fix-1.patch
patch -p 1 <../util-linux-2.12p-cramfs-1.patch

sed -i 's@/usr/include@/prelfs/include@g' configure &&
#only a few tools are needed:
./configure &&
make -C lib &&
make -C mount  mount umount &&
make -C text-utils  more &&
cp mount/{,u}mount text-utils/more /prelfs/bin
