#!/bin/sh

function ml_configure() {
	cd $BUILD/$PACKAGE/$PACKAGE
	(cd /usr/include;find ext2fs -print | cpio -pdvm $TOOLS/usr/include)
	autoconf
	./configure
}

function ml_compile() {
	cd $BUILD/$PACKAGE/$PACKAGE
	$JMAKE libs progs docs || :
}

function ml_installroot() {
	cd $BUILD/$PACKAGE/$PACKAGE

#	>  $BUILD/$PACKAGE/.INSTALL_TIME
#	sleep 2
	ML_BUILD_ROOT="/var/tmp/ML_BUILD_ROOT-e2fsprogs"
	rm -rf $ML_BUILD_ROOT
	mkdir  $ML_BUILD_ROOT
	make install install-libs DESTDIR="$ML_BUILD_ROOT" \
		root_sbindir=/sbin root_libdir=/lib || :
	
	cd $ML_BUILD_ROOT
	/usr/bin/install -m 755 -o root -g root sbin/fsck	$ROOT/sbin/fsck
	/usr/bin/install -m 755 -o root -g root sbin/fsck.ext2	$ROOT/sbin/fsck.ext2

	
#	(cd $ROOT;find . -newer $BUILD/$PACKAGE/.INSTALL_TIME -a -print > $BUILD/$PACKAGE/.INSTALL_LIST)
#	cat $BUILD/$PACKAGE/.INSTALL_LIST
	rm -rf $ML_BUILD_ROOT
}
