Initial commit of LFS notes and scripts.

This commit is contained in:
Shaun Setlock
2025-01-20 15:44:57 -05:00
commit 386dc3cec7
78 changed files with 2628 additions and 0 deletions

50
lfs-scripts/vim.sh Normal file
View 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}