#!/bin/sh set -o errexit # First argument of this script is the package name # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list # Applying patches (if any) apply_patches ${1} cd ${LFS_TMP}/${1} # Reinstalling Readline will cause the old libraries to be moved to # .old. While this is normally not a problem, in some # cases it can trigger a linking bug in ldconfig. This can be # avoided by issuing the following two seds: sed -i '/MV.*old/d' Makefile.in sed -i '/{OLDSUFF}/c:' support/shlib-install cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --libdir=/lib # SHLIB_LIBS=-lncurses: Forces Readline to link against the libncurses library. make SHLIB_LIBS=-lncurses make install # Now move the static libraries to a more appropriate location: mv -v /lib/lib{readline,history}.a /usr/lib # Next, remove the .so files in /lib and relink them into /usr/lib: rm -v /lib/lib{readline,history}.so ln -sfv ../../lib/libreadline.so.6 /usr/lib/libreadline.so ln -sfv ../../lib/libhistory.so.6 /usr/lib/libhistory.so exit $?