6.9. file 5.47

file identifies file types by checking filesystem metadata and magic signatures.

Input assumption: file-5.47.tar.gz is already present in LBI_SOURCES from the chapter 4 source staging step.

Licenses:

Dependencies:

file is a file type identification utility and library. we need it to detect file formats and binaries reliably in later build, packaging, and troubleshooting steps.

Extract and Enter the Source Tree

cd "$LBI_SOURCES"
tar -xf file-5.47.tar.gz
cd file-5.47

Configure file

CC="$LBI_ROOT/system/tools/bin/$LBI_TARGET-clang" \
lbi_configure \
    --host="$LBI_TARGET"

Build file

make $LWI_MAKE_FLAGS

Install file

make install DESTDIR="$LBI_ROOT"

Command Explanations