6.7. File-5.41

The File package contains a utility for determining the type of a given file or files.

Approximate build time: 0.2 SBU
Required disk space: 31 MB

6.7.1. Installation of File

The file command on the build host needs to be same version as the one we are building in order to create the signature file. Run the following commands to build it:

mkdir build
pushd build
  ../configure --disable-bzlib      \
               --disable-libseccomp \
               --disable-xzlib      \
               --disable-zlib
  make
popd

The meaning of the new configure option:

--disable-*

The configuration script attempts to use some packages from the host distribution if the corresponding library files exist. It may cause compilation failure if a library file exists, but the corresponding header files do not. These options prevent using these unneeded capabilities from the host.

Prepare File for compilation:

./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess)

Compile the package:

make FILE_COMPILE=$(pwd)/build/src/file

Install the package:

make DESTDIR=$LFS install

Details on this package are located in Section 8.10.2, “Contents of File.”