. "$PROJECTDIR/build/file/package.env" fetch $FILE_URL cd "$SOURCES" && tar xf file-$FILE_VERSION.tar.gz && cd file-$FILE_VERSION bootstrap() { echo bootstrap } toolchain() { mkdir -p build pushd build ../configure \ --disable-bzlib \ --disable-libseccomp \ --disable-xzlib \ --disable-zlib > /dev/null make > /dev/null popd ./configure \ --prefix=/usr \ --host="$TARGET" \ --build=$(./config.guess) > /dev/null make FILE_COMPILE="$(pwd)/build/src/file" > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null rm "$SYSROOT/usr/lib/libmagic.la" } setup() { echo setup } final() { echo final } case $1 in bootstrap) bootstrap ;; toolchain) toolchain ;; setup) setup ;; final) final ;; esac rm -rf "$SOURCES/file-$FILE_VERSION"