X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-readline;h=cf28d22f8b86c3c2926ab1d01801377157689df5;hb=d9a5344c1aa683d051d1a1d5e87f0bba317e299a;hp=13273f6446e1c4b2fedc6547c13ee2ba7ccbe230;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage2/cis-readline b/stage2/cis-readline index 13273f6..cf28d22 100755 --- a/stage2/cis-readline +++ b/stage2/cis-readline @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,31 +9,30 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${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 && +sed -i '/MV.*old/d' Makefile.in +sed -i '/{OLDSUFF}/c:' support/shlib-install -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ - --libdir=/lib && + --libdir=/lib # SHLIB_LIBS=-lncurses: Forces Readline to link against the libncurses library. -make SHLIB_LIBS=-lncurses && -make install && +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 && +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.5 /usr/lib/libreadline.so && -ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so +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 -# Return last error exit $?