The Kbd package contains key-table files and keyboard utilities.
The following patch fixes build issues with GCC 4.1.1:
patch -Np1 -i ../kbd-1.12-gcc4_fixes-1.patch
The following sed disables running the built conftests while running configure:
cp configure{,.orig}
sed -e "s@&& ./conftest@@" configure.orig > configure
The following sed removes -s from the install command which will try to strip the installed files:
cp src/Makefile.in{,.orig}
sed -e "s/install -s/install/" src/Makefile.in.orig > src/Makefile.in
Prepare Kbd for compilation:
./configure --datadir=/lib/kbd
The meaning of the configure options:
This option places the Kbd data and keymap files into /lib/kbd, as they are used by some of the scripts in the CLFS-Bootscripts package and must be on the root partition.
Configure detects the architecture of the host system. The following sed changes this value to your target architecture.
cp make_include{,.orig}
sed "/^ARCH/s/=.*/=arm/" make_include.orig > make_include
Compile the package:
make CC="${CC}"
Install the package:
make DESTDIR=${CLFS} install
Some of the Programs from Kbd are used by some of the scripts in the CLFS-Bootscripts package. As /usr may not be available during the early stages of booting, those binaries need to be on the root partition:
mv -v ${CLFS}/usr/bin/{kbd_mode,openvt,setfont} ${CLFS}/bin