Initial commit of LFS notes and scripts.
This commit is contained in:
25
lfs-scripts/acl.sh
Normal file
25
lfs-scripts/acl.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="acl-2.3.2"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/acl-2.3.2
|
||||
make && make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
28
lfs-scripts/attr.sh
Normal file
28
lfs-scripts/attr.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
# Set the package we're building.
|
||||
package="attr-2.5.2"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--sysconfdir=/etc \
|
||||
--docdir=/usr/share/doc/attr-2.5.2
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/autoconf.sh
Normal file
26
lfs-scripts/autoconf.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="autoconf-2.72"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/automake.sh
Normal file
26
lfs-scripts/automake.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="automake-1.17"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.17
|
||||
make
|
||||
make -j$(($(nproc)>4?$(nproc):4)) check
|
||||
make install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
29
lfs-scripts/bash.sh
Normal file
29
lfs-scripts/bash.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# Set the package we're building.
|
||||
package="bash-5.2.32"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--without-bash-malloc \
|
||||
--with-installed-readline \
|
||||
bash_cv_strtold_broken=no \
|
||||
--docdir=/usr/share/doc/bash-5.2.32
|
||||
make
|
||||
chown -R tester .
|
||||
su -s /usr/bin/expect tester << "EOF"
|
||||
set timeout -1
|
||||
spawn make tests
|
||||
expect eof
|
||||
lassign [wait] _ _ _ value
|
||||
exit $value
|
||||
EOF
|
||||
make install
|
||||
exec /usr/bin/bash --login
|
||||
23
lfs-scripts/bison.sh
Normal file
23
lfs-scripts/bison.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="bison-3.8.2"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.8.2
|
||||
make && make check && make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
22
lfs-scripts/blank.sh
Normal file
22
lfs-scripts/blank.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
# Set the package we're building.
|
||||
package=""
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
4
lfs-scripts/c8_cleanup.sh
Normal file
4
lfs-scripts/c8_cleanup.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
rm -rf /tmp/{*,.*}
|
||||
find /usr/lib /usr/libexec -name \*.la -delete
|
||||
find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf
|
||||
userdel -r tester
|
||||
26
lfs-scripts/check.sh
Normal file
26
lfs-scripts/check.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="check-0.15.2"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr --disable-static
|
||||
make
|
||||
make check
|
||||
make docdir=/usr/share/doc/check-0.15.2 install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
37
lfs-scripts/coreutils.sh
Normal file
37
lfs-scripts/coreutils.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
# Set the package we're building.
|
||||
package="coreutils-9.5"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
patch -Np1 -i ../coreutils-9.5-i18n-2.patch
|
||||
autoreconf -fiv
|
||||
FORCE_UNSAFE_CONFIGURE=1 ./configure \
|
||||
--prefix=/usr \
|
||||
--enable-no-install-program=kill,uptime
|
||||
make
|
||||
make NON_ROOT_USERNAME=tester check-root
|
||||
groupadd -g 102 dummy -U tester
|
||||
chown -R tester .
|
||||
su tester -c "PATH=$PATH make -k RUN_EXPENSIVE_TESTS=yes check" \
|
||||
< /dev/null
|
||||
groupdel dummy
|
||||
make install
|
||||
mv -v /usr/bin/chroot /usr/sbin
|
||||
mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
|
||||
sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
25
lfs-scripts/diffutils.sh
Normal file
25
lfs-scripts/diffutils.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="diffutils-3.10"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
41
lfs-scripts/e2fsprogs.sh
Normal file
41
lfs-scripts/e2fsprogs.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
# Set the package we're building.
|
||||
package="e2fsprogs-1.47.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
mkdir -v build
|
||||
cd build
|
||||
../configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--enable-elf-shlibs \
|
||||
--disable-libblkid \
|
||||
--disable-libuuid \
|
||||
--disable-uuidd \
|
||||
--disable-fsck
|
||||
make
|
||||
make check
|
||||
make install
|
||||
rm -fv /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
|
||||
gunzip -v /usr/share/info/libext2fs.info.gz
|
||||
install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info
|
||||
makeinfo -o doc/com_err.info ../lib/et/com_err.texinfo
|
||||
install -v -m644 doc/com_err.info /usr/share/info
|
||||
install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info
|
||||
sed 's/metadata_csum_seed,//' -i /etc/mke2fs.conf
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/expat.sh
Normal file
26
lfs-scripts/expat.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="expat-2.6.2"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/expat-2.6.2
|
||||
make && make check && make install
|
||||
install -v -m644 doc/*.{html,css} /usr/share/doc/expat-2.6.2
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/findutils.sh
Normal file
26
lfs-scripts/findutils.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="findutils-4.10.0"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr --localstatedir=/var/lib/locate
|
||||
make
|
||||
chown -R tester .
|
||||
su tester -c "PATH=$PATH make check"
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
24
lfs-scripts/flit_core.sh
Normal file
24
lfs-scripts/flit_core.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
# Set the package we're building.
|
||||
package="flit_core-3.9.0"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
|
||||
pip3 install --no-index --no-user --find-links dist flit_core
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
31
lfs-scripts/gawk.sh
Normal file
31
lfs-scripts/gawk.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
# Set the package we're building.
|
||||
package="gawk-5.3.0"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i 's/extras//' Makefile.in
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
chown -R tester .
|
||||
su tester -c "PATH=$PATH make check"
|
||||
rm -f /usr/bin/gawk-5.3.0
|
||||
make install
|
||||
ln -sv gawk.1 /usr/share/man/man1/awk.1
|
||||
mkdir -pv /usr/share/doc/gawk-5.3.0
|
||||
cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.3.0
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
68
lfs-scripts/gcc.sh
Normal file
68
lfs-scripts/gcc.sh
Normal file
@@ -0,0 +1,68 @@
|
||||
# Set the package we're building.
|
||||
package="gcc-14.2.0"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
case $(uname -m) in
|
||||
x86_64)
|
||||
sed -e '/m64=/s/lib64/lib/' \
|
||||
-i.orig gcc/config/i386/t-linux64
|
||||
;;
|
||||
esac
|
||||
mkdir -v build
|
||||
cd build
|
||||
../configure --prefix=/usr \
|
||||
LD=ld \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-default-pie \
|
||||
--enable-default-ssp \
|
||||
--enable-host-pie \
|
||||
--disable-multilib \
|
||||
--disable-bootstrap \
|
||||
--disable-fixincludes \
|
||||
--with-system-zlib
|
||||
make
|
||||
ulimit -s -H unlimited
|
||||
sed -e '/cpython/d' -i ../gcc/testsuite/gcc.dg/plugin/plugin.exp
|
||||
sed -e 's/no-pic /&-no-pie /' -i ../gcc/testsuite/gcc.target/i386/pr113689-1.c
|
||||
sed -e 's/300000/(1|300000)/' -i ../libgomp/testsuite/libgomp.c-c++-common/pr109062.c
|
||||
sed -e 's/{ target nonpic } //' \
|
||||
-e '/GOTPCREL/d' -i ../gcc/testsuite/gcc.target/i386/fentryname3.c
|
||||
chown -R tester .
|
||||
su tester -c "PATH=$PATH make -k check"
|
||||
../contrib/test_summary
|
||||
make install
|
||||
chown -v -R root:root \
|
||||
/usr/lib/gcc/$(gcc -dumpmachine)/14.2.0/include{,-fixed}
|
||||
ln -svr /usr/bin/cpp /usr/lib
|
||||
ln -sv gcc.1 /usr/share/man/man1/cc.1ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/14.2.0/liblto_plugin.so \
|
||||
/usr/lib/bfd-plugins/
|
||||
echo 'int main(){}' > dummy.c
|
||||
cc dummy.c -v -Wl,--verbose &> dummy.log
|
||||
readelf -l a.out | grep ': /lib'
|
||||
sleep 10
|
||||
grep -E -o '/usr/lib.*/S?crt[1in].*succeeded' dummy.log
|
||||
sleep 10
|
||||
grep -B4 '^ /usr/include' dummy.log
|
||||
sleep 10
|
||||
grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
|
||||
sleep 10
|
||||
rm -v dummy.c a.out dummy.log
|
||||
mkdir -pv /usr/share/gdb/auto-load/usr/lib
|
||||
mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
25
lfs-scripts/gdbm.sh
Normal file
25
lfs-scripts/gdbm.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="gdbm-1.24"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--enable-libgdbm-compat
|
||||
make && make check && make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/gettext.sh
Normal file
26
lfs-scripts/gettext.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="gettext-0.22.5"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/gettext-0.22.5
|
||||
make && make check && make install
|
||||
chmod -v 0755 /usr/lib/preloadable_libintl.so
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
10
lfs-scripts/gmp.sh
Normal file
10
lfs-scripts/gmp.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
./configure --prefix=/usr \
|
||||
--enable-cxx \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/gmp-6.3.0
|
||||
make
|
||||
make html
|
||||
make check 2>&1 | tee gmp-check-log
|
||||
awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log
|
||||
make install
|
||||
make install-html
|
||||
23
lfs-scripts/gperf.sh
Normal file
23
lfs-scripts/gperf.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="gperf-3.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1
|
||||
make && make -j1 check && make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
24
lfs-scripts/grep.sh
Normal file
24
lfs-scripts/grep.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
# Set the package we're building.
|
||||
package="grep-3.11"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i "s/echo/#echo/" src/egrep.sh
|
||||
./configure --prefix=/usr
|
||||
make && make check && make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
25
lfs-scripts/groff.sh
Normal file
25
lfs-scripts/groff.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="groff-1.23.0"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
PAGE=letter ./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
30
lfs-scripts/grub.sh
Normal file
30
lfs-scripts/grub.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
# Set the package we're building.
|
||||
package="grub-2.12"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
unset {C,CPP,CXX,LD}FLAGS
|
||||
echo depends bli part_gpt > grub-core/extra_deps.lst
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--disable-efiemu \
|
||||
--disable-werror
|
||||
make
|
||||
make install
|
||||
mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
25
lfs-scripts/gzip.sh
Normal file
25
lfs-scripts/gzip.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="gzip-1.13"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
35
lfs-scripts/inetutils.sh
Normal file
35
lfs-scripts/inetutils.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
# Set the package we're building.
|
||||
package="inetutils-2.5"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i 's/def HAVE_TERMCAP_TGETENT/ 1/' telnet/telnet.c
|
||||
./configure --prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--localstatedir=/var \
|
||||
--disable-logger \
|
||||
--disable-whois \
|
||||
--disable-rcp \
|
||||
--disable-rexec \
|
||||
--disable-rlogin \
|
||||
--disable-rsh \
|
||||
--disable-servers
|
||||
make && make check && make install
|
||||
mv -v /usr/{,s}bin/ifconfig
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
27
lfs-scripts/intltool.sh
Normal file
27
lfs-scripts/intltool.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
# Set the package we're building.
|
||||
package="intltool-0.51.0"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i 's:\\\${:\\\$\\{:' intltool-update.in
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-0.51.0/I18N-HOWTO
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
27
lfs-scripts/iproute2.sh
Normal file
27
lfs-scripts/iproute2.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
# Set the package we're building.
|
||||
package="iproute2-6.10.0"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i /ARPD/d Makefile
|
||||
rm -fv man/man8/arpd.8
|
||||
make NETNS_RUN_DIR=/run/netns
|
||||
make SBINDIR=/usr/sbin install
|
||||
mkdir -pv /usr/share/doc/iproute2-6.10.0
|
||||
cp -v COPYING README* /usr/share/doc/iproute2-6.10.0
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
23
lfs-scripts/jinja2.sh
Normal file
23
lfs-scripts/jinja2.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="jinja2-3.1.4"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
|
||||
pip3 install --no-index --no-user --find-links dist Jinja2
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
29
lfs-scripts/kbd.sh
Normal file
29
lfs-scripts/kbd.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# Set the package we're building.
|
||||
package="kbd-2.6.4"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
patch -Np1 -i ../kbd-2.6.4-backspace-1.patch
|
||||
sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure
|
||||
sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in
|
||||
./configure --prefix=/usr --disable-vlock
|
||||
make
|
||||
make check
|
||||
make install
|
||||
cp -R -v docs/doc -T /usr/share/doc/kbd-2.6.4
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
35
lfs-scripts/kmod.sh
Normal file
35
lfs-scripts/kmod.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
# Set the package we're building.
|
||||
package="kmod-33"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--with-openssl \
|
||||
--with-xz \
|
||||
--with-zstd \
|
||||
--with-zlib \
|
||||
--disable-manpages
|
||||
make
|
||||
make install
|
||||
|
||||
for target in depmod insmod modinfo modprobe rmmod; do
|
||||
ln -sfv ../bin/kmod /usr/sbin/$target
|
||||
rm -fv /usr/bin/$target
|
||||
done
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
24
lfs-scripts/less.sh
Normal file
24
lfs-scripts/less.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
# Set the package we're building.
|
||||
package="less-661"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr --sysconfdir=/etc
|
||||
make && make check && make install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
25
lfs-scripts/libcap.sh
Normal file
25
lfs-scripts/libcap.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="libcap-2.70"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i '/install -m.*STA/d' libcap/Makefile
|
||||
make prefix=/usr lib=lib
|
||||
make test
|
||||
make prefix=/usr lib=lib install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
29
lfs-scripts/libelf.sh
Normal file
29
lfs-scripts/libelf.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# Set the package we're building.
|
||||
package="elfutils-0.191"
|
||||
extension=".tar.bz2"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-debuginfod \
|
||||
--enable-libdebuginfod=dummy
|
||||
make
|
||||
make check
|
||||
make -C libelf install
|
||||
install -vm644 config/libelf.pc /usr/lib/pkgconfig
|
||||
rm /usr/lib/libelf.a
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
27
lfs-scripts/libffi.sh
Normal file
27
lfs-scripts/libffi.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
# Set the package we're building.
|
||||
package="libffi-3.4.6"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--with-gcc-arch=native
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/libpipeline.sh
Normal file
26
lfs-scripts/libpipeline.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="libpipeline-1.5.7"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/libtool.sh
Normal file
26
lfs-scripts/libtool.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="libtool-2.4.7"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make -k check
|
||||
make install
|
||||
rm -fv /usr/lib/libltdl.a
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
29
lfs-scripts/libxcrypt.sh
Normal file
29
lfs-scripts/libxcrypt.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# Set the package we're building.
|
||||
package="libxcrypt-4.4.36"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--enable-hashes=strong,glibc \
|
||||
--enable-obsolete-api=no \
|
||||
--disable-static \
|
||||
--disable-failure-tokens
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/make.sh
Normal file
26
lfs-scripts/make.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="make-4.4.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
chown -R tester .
|
||||
su tester -c "PATH=$PATH make check"
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
35
lfs-scripts/mandb.sh
Normal file
35
lfs-scripts/mandb.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
# Set the package we're building.
|
||||
package="man-db-2.12.1"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--docdir=/usr/share/doc/man-db-2.12.1 \
|
||||
--sysconfdir=/etc \
|
||||
--disable-setuid \
|
||||
--enable-cache-owner=bin \
|
||||
--with-browser=/usr/bin/lynx \
|
||||
--with-vgrind=/usr/bin/vgrind \
|
||||
--with-grap=/usr/bin/grap \
|
||||
--with-systemdtmpfilesdir= \
|
||||
--with-systemdsystemunitdir=
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
23
lfs-scripts/markupsafe.sh
Normal file
23
lfs-scripts/markupsafe.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="MarkupSafe-2.1.5"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
|
||||
pip3 install --no-index --no-user --find-links dist Markupsafe
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
25
lfs-scripts/meson.sh
Normal file
25
lfs-scripts/meson.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="meson-1.5.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
|
||||
pip3 install --no-index --find-links dist meson
|
||||
install -vDm644 data/shell-completions/bash/meson /usr/share/bash-completion/completions/meson
|
||||
install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/_meson
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
29
lfs-scripts/mpc.sh
Normal file
29
lfs-scripts/mpc.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# Set the package we're building.
|
||||
package="mpc-1.3.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/mpc-1.3.1
|
||||
make
|
||||
make html
|
||||
make check
|
||||
make install
|
||||
make install-html
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
25
lfs-scripts/mpfr.sh
Normal file
25
lfs-scripts/mpfr.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
# Set the package we're building.
|
||||
package="mpfr-4.2.1"
|
||||
|
||||
# Decompress the source.
|
||||
tar xvf ${package}.tar.xz
|
||||
|
||||
# Enter the unpacked sources.
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--enable-thread-safe \
|
||||
--docdir=/usr/share/doc/mpfr-4.2.1
|
||||
make
|
||||
make html
|
||||
make check
|
||||
make install
|
||||
make install-html
|
||||
|
||||
# Exit sources directory.
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
rm -rf ${package}
|
||||
43
lfs-scripts/ncurses.sh
Normal file
43
lfs-scripts/ncurses.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
# Set the package we're building.
|
||||
package="ncurses-6.5"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--with-shared \
|
||||
--without-debug \
|
||||
--without-normal \
|
||||
--with-cxx-shared \
|
||||
--enable-pc-files \
|
||||
--with-pkg-config-libdir=/usr/lib/pkgconfig
|
||||
make
|
||||
make DESTDIR=$PWD/dest install
|
||||
install -vm755 dest/usr/lib/libncursesw.so.6.5 /usr/lib
|
||||
rm -v dest/usr/lib/libncursesw.so.6.5
|
||||
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
|
||||
-i dest/usr/include/curses.h
|
||||
cp -av dest/* /
|
||||
for lib in ncurses form panel menu ; do
|
||||
ln -sfv lib${lib}w.so /usr/lib/lib${lib}.so
|
||||
ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
|
||||
done
|
||||
ln -sfv libncursesw.so /usr/lib/libcurses.so
|
||||
cp -v -R doc -T /usr/share/doc/ncurses-6.5
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
32
lfs-scripts/ninja.sh
Normal file
32
lfs-scripts/ninja.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
# Set the package we're building.
|
||||
package="ninja-1.12.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
export NINJAJOBS=4
|
||||
sed -i '/int Guess/a \
|
||||
int j = 0;\
|
||||
char* jobs = getenv( "NINJAJOBS" );\
|
||||
if ( jobs != NULL ) j = atoi( jobs );\
|
||||
if ( j > 0 ) return j;\
|
||||
' src/ninja.cc
|
||||
python3 configure.py --bootstrap
|
||||
install -vm755 ninja /usr/bin/
|
||||
install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja
|
||||
install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
32
lfs-scripts/openssl.sh
Normal file
32
lfs-scripts/openssl.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
# Set the package we're building.
|
||||
package="openssl-3.3.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./config --prefix=/usr \
|
||||
--openssldir=/etc/ssl \
|
||||
--libdir=lib \
|
||||
shared \
|
||||
zlib-dynamic
|
||||
make
|
||||
HARNESS_JOBS=$(nproc) make test
|
||||
sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
|
||||
make MANSUFFIX=ssl install
|
||||
mv -v /usr/share/doc/openssl /usr/share/doc/openssl-3.3.1
|
||||
cp -vfr doc/* /usr/share/doc/openssl-3.3.1
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
26
lfs-scripts/patch.sh
Normal file
26
lfs-scripts/patch.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set the package we're building.
|
||||
package="patch-2.7.6"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
41
lfs-scripts/perl.sh
Normal file
41
lfs-scripts/perl.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
# Set the package we're building.
|
||||
package="perl-5.40.0"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
export BUILD_ZLIB=False
|
||||
export BUILD_BZIP2=0
|
||||
sh Configure -des \
|
||||
-D prefix=/usr \
|
||||
-D vendorprefix=/usr \
|
||||
-D privlib=/usr/lib/perl5/5.40/core_perl \
|
||||
-D archlib=/usr/lib/perl5/5.40/core_perl \
|
||||
-D sitelib=/usr/lib/perl5/5.40/site_perl \
|
||||
-D sitearch=/usr/lib/perl5/5.40/site_perl \
|
||||
-D vendorlib=/usr/lib/perl5/5.40/vendor_perl \
|
||||
-D vendorarch=/usr/lib/perl5/5.40/vendor_perl \
|
||||
-D man1dir=/usr/share/man/man1 \
|
||||
-D man3dir=/usr/share/man/man3 \
|
||||
-D pager="/usr/bin/less -isR" \
|
||||
-D useshrplib \
|
||||
-D usethreads
|
||||
make
|
||||
TEST_JOBS=$(nproc) make test_harness
|
||||
make install
|
||||
unset BUILD_ZLIB BUILD_BZIP2
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
30
lfs-scripts/procps-ng.sh
Normal file
30
lfs-scripts/procps-ng.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
# Set the package we're building.
|
||||
package="procps-ng-4.0.4"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--docdir=/usr/share/doc/procps-ng-4.0.4 \
|
||||
--disable-static \
|
||||
--disable-kill
|
||||
make
|
||||
chown -R tester .
|
||||
su tester -c "PATH=$PATH make check"
|
||||
make install
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
23
lfs-scripts/psmisc.sh
Normal file
23
lfs-scripts/psmisc.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="psmisc-23.7"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make && make check && make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
40
lfs-scripts/python3.sh
Normal file
40
lfs-scripts/python3.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
# Set the package we're building.
|
||||
package="Python-3.12.5"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--enable-shared \
|
||||
--with-system-expat \
|
||||
--enable-optimizations
|
||||
make
|
||||
make test TESTOPTS="--timeout 120"
|
||||
make install
|
||||
cat > /etc/pip.conf << EOF
|
||||
[global]
|
||||
root-user-action = ignore
|
||||
disable-pip-version-check = true
|
||||
EOF
|
||||
install -v -dm755 /usr/share/doc/python-3.12.5/html
|
||||
|
||||
tar --no-same-owner \
|
||||
-xvf ../python-3.12.5-docs-html.tar.bz2
|
||||
cp -R --no-preserve=mode python-3.12.5-docs-html/* \
|
||||
/usr/share/doc/python-3.12.5/html
|
||||
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
1
lfs-scripts/scp_to_lfs.sh
Executable file
1
lfs-scripts/scp_to_lfs.sh
Executable file
@@ -0,0 +1 @@
|
||||
scp -r ./* root@lfs.home.lan:/mnt/lfs/sources/scripts
|
||||
28
lfs-scripts/sed.sh
Normal file
28
lfs-scripts/sed.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
# Set the package we're building.
|
||||
package="sed-4.9"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make && make html
|
||||
chown -R tester .
|
||||
su tester -c "PATH=$PATH make check"
|
||||
make install
|
||||
install -d -m755 /usr/share/doc/sed-4.9
|
||||
install -m644 doc/sed.html /usr/share/doc/sed-4.9
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
23
lfs-scripts/setuptools.sh
Normal file
23
lfs-scripts/setuptools.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="setuptools-72.2.0"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
|
||||
pip3 install --no-index --find-links dist setuptools
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
43
lfs-scripts/shadow.sh
Normal file
43
lfs-scripts/shadow.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
# Set the package we're building.
|
||||
package="shadow-4.16.0"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
|
||||
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
|
||||
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
|
||||
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
|
||||
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \
|
||||
-e 's:/var/spool/mail:/var/mail:' \
|
||||
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
|
||||
-i etc/login.defs
|
||||
touch /usr/bin/passwd
|
||||
./configure --sysconfdir=/etc \
|
||||
--disable-static \
|
||||
--with-{b,yes}crypt \
|
||||
--without-libbsd \
|
||||
--with-group-name-max-length=32
|
||||
make
|
||||
make exec_prefix=/usr install
|
||||
make -C man install-man
|
||||
pwconv
|
||||
grpconv
|
||||
mkdir -p /etc/default
|
||||
useradd -D --gid 999
|
||||
passwd root
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
43
lfs-scripts/sysklogd.sh
Normal file
43
lfs-scripts/sysklogd.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
# Set the package we're building.
|
||||
package="sysklogd-2.6.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--runstatedir=/run \
|
||||
--without-logger
|
||||
make
|
||||
make install
|
||||
cat > /etc/syslog.conf << "EOF"
|
||||
# Begin /etc/syslog.conf
|
||||
|
||||
auth,authpriv.* -/var/log/auth.log
|
||||
*.*;auth,authpriv.none -/var/log/sys.log
|
||||
daemon.* -/var/log/daemon.log
|
||||
kern.* -/var/log/kern.log
|
||||
mail.* -/var/log/mail.log
|
||||
user.* -/var/log/user.log
|
||||
*.emerg *
|
||||
|
||||
# Do not open any internet ports.
|
||||
secure_mode 2
|
||||
|
||||
# End /etc/syslog.conf
|
||||
EOF
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
24
lfs-scripts/sysvinit.sh
Normal file
24
lfs-scripts/sysvinit.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
# Set the package we're building.
|
||||
package="sysvinit-3.10"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
patch -Np1 -i ../sysvinit-3.10-consolidated-1.patch
|
||||
make
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
27
lfs-scripts/tar.sh
Normal file
27
lfs-scripts/tar.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
# Set the package we're building.
|
||||
package="tar-1.35"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
FORCE_UNSAFE_CONFIGURE=1 \
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
make -C doc install-html docdir=/usr/share/doc/tar-1.35
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
32
lfs-scripts/texinfo.sh
Normal file
32
lfs-scripts/texinfo.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
# Set the package we're building.
|
||||
package="texinfo-7.1"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make check
|
||||
make install
|
||||
make TEXMF=/usr/share/texmf install-tex
|
||||
pushd /usr/share/info
|
||||
rm -v dir
|
||||
for f in *
|
||||
do install-info $f dir 2>/dev/null
|
||||
done
|
||||
popd
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
80
lfs-scripts/udev.sh
Normal file
80
lfs-scripts/udev.sh
Normal file
@@ -0,0 +1,80 @@
|
||||
# Set the package we're building.
|
||||
package="systemd-256.4"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i -e 's/GROUP="render"/GROUP="video"/' \
|
||||
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in
|
||||
sed '/systemd-sysctl/s/^/#/' -i rules.d/99-systemd.rules.in
|
||||
sed '/NETWORK_DIRS/s/systemd/udev/' -i src/basic/path-lookup.h
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
meson setup .. \
|
||||
--prefix=/usr \
|
||||
--buildtype=release \
|
||||
-D mode=release \
|
||||
-D dev-kvm-mode=0660 \
|
||||
-D link-udev-shared=false \
|
||||
-D logind=false \
|
||||
-D vconsole=false
|
||||
export udev_helpers=$(grep "'name' :" ../src/udev/meson.build | \
|
||||
awk '{print $3}' | tr -d ",'" | grep -v 'udevadm')
|
||||
ninja udevadm systemd-hwdb \
|
||||
$(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \
|
||||
$(realpath libudev.so --relative-to .) \
|
||||
$udev_helpers
|
||||
install -vm755 -d {/usr/lib,/etc}/udev/{hwdb.d,rules.d,network}
|
||||
install -vm755 -d /usr/{lib,share}/pkgconfig
|
||||
install -vm755 udevadm /usr/bin/
|
||||
install -vm755 systemd-hwdb /usr/bin/udev-hwdb
|
||||
ln -svfn ../bin/udevadm /usr/sbin/udevd
|
||||
cp -av libudev.so{,*[0-9]} /usr/lib/
|
||||
install -vm644 ../src/libudev/libudev.h /usr/include/
|
||||
install -vm644 src/libudev/*.pc /usr/lib/pkgconfig/
|
||||
install -vm644 src/udev/*.pc /usr/share/pkgconfig/
|
||||
install -vm644 ../src/udev/udev.conf /etc/udev/
|
||||
install -vm644 rules.d/* ../rules.d/README /usr/lib/udev/rules.d/
|
||||
install -vm644 $(find ../rules.d/*.rules \
|
||||
-not -name '*power-switch*') /usr/lib/udev/rules.d/
|
||||
install -vm644 hwdb.d/* ../hwdb.d/{*.hwdb,README} /usr/lib/udev/hwdb.d/
|
||||
install -vm755 $udev_helpers /usr/lib/udev
|
||||
install -vm644 ../network/99-default.link /usr/lib/udev/network
|
||||
tar -xvf ../../udev-lfs-20230818.tar.xz
|
||||
make -f udev-lfs-20230818/Makefile.lfs install
|
||||
tar -xf ../../systemd-man-pages-256.4.tar.xz \
|
||||
--no-same-owner --strip-components=1 \
|
||||
-C /usr/share/man --wildcards '*/udev*' '*/libudev*' \
|
||||
'*/systemd.link.5' \
|
||||
'*/systemd-'{hwdb,udevd.service}.8
|
||||
|
||||
sed 's|systemd/network|udev/network|' \
|
||||
/usr/share/man/man5/systemd.link.5 \
|
||||
> /usr/share/man/man5/udev.link.5
|
||||
|
||||
sed 's/systemd\(\\\?-\)/udev\1/' /usr/share/man/man8/systemd-hwdb.8 \
|
||||
> /usr/share/man/man8/udev-hwdb.8
|
||||
|
||||
sed 's|lib.*udevd|sbin/udevd|' \
|
||||
/usr/share/man/man8/systemd-udevd.service.8 \
|
||||
> /usr/share/man/man8/udevd.8
|
||||
|
||||
rm /usr/share/man/man*/systemd*
|
||||
unset udev_helpers
|
||||
udev-hwdb update
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
42
lfs-scripts/util-linux.sh
Normal file
42
lfs-scripts/util-linux.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
# Set the package we're building.
|
||||
package="util-linux-2.40.2"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
./configure --bindir=/usr/bin \
|
||||
--libdir=/usr/lib \
|
||||
--runstatedir=/run \
|
||||
--sbindir=/usr/sbin \
|
||||
--disable-chfn-chsh \
|
||||
--disable-login \
|
||||
--disable-nologin \
|
||||
--disable-su \
|
||||
--disable-setpriv \
|
||||
--disable-runuser \
|
||||
--disable-pylibmount \
|
||||
--disable-liblastlog2 \
|
||||
--disable-static \
|
||||
--without-python \
|
||||
--without-systemd \
|
||||
--without-systemdsystemunitdir \
|
||||
ADJTIME_PATH=/var/lib/hwclock/adjtime \
|
||||
--docdir=/usr/share/doc/util-linux-2.40.2
|
||||
make
|
||||
# skipping tests
|
||||
make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
50
lfs-scripts/vim.sh
Normal file
50
lfs-scripts/vim.sh
Normal file
@@ -0,0 +1,50 @@
|
||||
# Set the package we're building.
|
||||
package="vim-9.1.0660"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
chown -R tester .
|
||||
su tester -c "TERM=xterm-256color LANG=en_US.UTF-8 make -j1 test" \
|
||||
&> vim-test.log
|
||||
make install
|
||||
ln -sv vim /usr/bin/vi
|
||||
for L in /usr/share/man/{,*/}man1/vim.1; do
|
||||
ln -sv vim.1 $(dirname $L)/vi.1
|
||||
done
|
||||
ln -sv ../vim/vim91/doc /usr/share/doc/vim-9.1.0660
|
||||
cat > /etc/vimrc << "EOF"
|
||||
" Begin /etc/vimrc
|
||||
|
||||
" Ensure defaults are set before customizing settings, not after
|
||||
source $VIMRUNTIME/defaults.vim
|
||||
let skip_defaults_vim=1
|
||||
|
||||
set nocompatible
|
||||
set backspace=2
|
||||
set mouse=
|
||||
syntax on
|
||||
if (&term == "xterm") || (&term == "putty")
|
||||
set background=dark
|
||||
endif
|
||||
|
||||
" End /etc/vimrc
|
||||
EOF
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
19
lfs-scripts/virtual_kernel_filesystem_prep_and_chroot.sh
Normal file
19
lfs-scripts/virtual_kernel_filesystem_prep_and_chroot.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
mkdir -pv $LFS/{dev,proc,sys,run}
|
||||
mount -v --bind /dev $LFS/dev
|
||||
mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts
|
||||
mount -vt proc proc $LFS/proc
|
||||
mount -vt sysfs sysfs $LFS/sys
|
||||
mount -vt tmpfs tmpfs $LFS/run
|
||||
if [ -h $LFS/dev/shm ]; then
|
||||
install -v -d -m 1777 $LFS$(realpath /dev/shm)
|
||||
else
|
||||
mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
|
||||
fi
|
||||
chroot "$LFS" /usr/bin/env -i \
|
||||
HOME=/root \
|
||||
TERM="$TERM" \
|
||||
PS1='(lfs chroot) \u:\w\$ ' \
|
||||
PATH=/usr/bin:/usr/sbin \
|
||||
MAKEFLAGS="-j$(nproc)" \
|
||||
TESTSUITEFLAGS="-j$(nproc)" \
|
||||
/bin/bash --login
|
||||
23
lfs-scripts/wheel.sh
Normal file
23
lfs-scripts/wheel.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="wheel-0.44.0"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
|
||||
pip3 install --no-index --find-links=dist wheel
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
23
lfs-scripts/xml_parser.sh
Normal file
23
lfs-scripts/xml_parser.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set the package we're building.
|
||||
package="XML-Parser-2.47"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
perl Makefile.PL
|
||||
make && make test && make install
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
Reference in New Issue
Block a user