#!/bin/bash CONFIGURE_OPTS="\ --libdir=/lib ${CONFIGURE_OPTS}" hvconfig_pre() { cd ${LFS_TMP}/${PACKAGE} # 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 } hvbuild() { # SHLIB_LIBS=-lncurses: Forces Readline to link against the libncurses library. make SHLIB_LIBS=-lncurses make install } hvbuild_post() { # 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 }