Command explanations
patch -Np1 -i
../ncurses-&ncurses-version;-patch: This patch fixes a compile
problem with GCC-3.1 because Ncurses uses constructions that are no longer
valid in the new C++ standard.
--with-shared: This enables the build of the
shared ncurses library files.
--disable-termcap: Disabled the compilation of
termcap fall back support.
mv /lib/*.a /usr/lib : This
moves all of the static ncurses library files from /lib to /usr/lib.
/lib should only contain the shared files which are essential to the
system when /usr may not be mounted.
chmod 755 *.5.2: Shared libraries should be
executable. Ncurses install routine doesn't set the permissions
properly so we do it manually instead.
ln -sf libncurses.a libcurses.a: Some
programs try to link using -lcurses instead of -lncurses. This symlink
ensures that such programs will link without errors.
ln -sf ../../lib/libncurses.so etc: These
symlinks are created to tidy up the installation. It's good practice to
have the *.so files in /usr/lib as well as in /lib, to ensure that the
linker is always able to find the files whether it's looking in /lib or
/usr/lib.