mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2025-03-13 14:49:21 +00:00
Add 6.7 - Build file
This commit is contained in:
parent
33df75051a
commit
e9e05b2324
2 changed files with 61 additions and 0 deletions
48
scripts/chapter6/6.7-file.sh
Normal file
48
scripts/chapter6/6.7-file.sh
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd $LFS/sources
|
||||||
|
tar xf file-5.42.tar.gz
|
||||||
|
cd file-5.42
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
pushd build
|
||||||
|
../configure --disable-bzlib \
|
||||||
|
--disable-libseccomp \
|
||||||
|
--disable-xzlib \
|
||||||
|
--disable-zlib
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess)
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
make FILE_COMPILE=$(pwd)/build/src/file
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
make DESTDIR=$LFS install
|
||||||
|
|
||||||
|
rm -v $LFS/usr/lib/libmagic.la
|
||||||
|
|
||||||
|
cd $LFS/sources
|
||||||
|
rm -rf file-5.42
|
||||||
|
|
|
@ -238,6 +238,7 @@ if [ $exit_status -ne 0 ]
|
||||||
then
|
then
|
||||||
stop_script "chapter6/6.5-ncurses.sh"
|
stop_script "chapter6/6.5-ncurses.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Chapter 6.6
|
# Chapter 6.6
|
||||||
# ===========
|
# ===========
|
||||||
echo "Building diffutils"
|
echo "Building diffutils"
|
||||||
|
@ -250,3 +251,15 @@ then
|
||||||
stop_script "chapter6/6.6-diffutils.sh"
|
stop_script "chapter6/6.6-diffutils.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Chapter 6.7
|
||||||
|
# ===========
|
||||||
|
echo "Building file"
|
||||||
|
su - lfs -c "bash $PWD/chapter6/6.7-file.sh"
|
||||||
|
|
||||||
|
# Exit on error
|
||||||
|
check_exit_code
|
||||||
|
if [ $exit_status -ne 0 ]
|
||||||
|
then
|
||||||
|
stop_script "chapter6/6.7-file.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue