Installing Ncurses-5.2

Estimated build time:           6 minutes
Estimated required disk space:  29 MB

Installation of Ncurses

Install Ncurses by running the following commands:

./configure --prefix=/usr --libdir=/lib \
   --with-shared --disable-termcap &&
make &&
make install &&
cd /lib &&
mv *.a /usr/lib &&
chmod 755 *.5.2 &&
cd /usr/lib &&
ln -sf libncurses.a libcurses.a &&
ln -sf ../../lib/libncurses.so &&
ln -sf ../../lib/libcurses.so &&
ln -sf ../../lib/libform.so &&
ln -sf ../../lib/libpanel.so &&
ln -sf ../../lib/libmenu.so

Command explanations

--with-shared: This enables the build of the shared ncurses library files.

--disable-termcap: Disabled the compilation of termcap fall back support.

cd /lib && mv *.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 links are created because if they aren't, the linker will not find the dynamic libraries when linking and so link all programs with the static versions.

Contents

The Ncurses package contains the ncurses, panel, menu and form libraries. It also contains the clear, infocmp, tic, toe, tput and tset programs.

Description

The libraries

The libraries that make up the Ncurses library are used to display text (often in a fancy way) on the screen. An example where ncurses is used is in the kernel's "make menuconfig" process. The libraries contain routines to create panels, menu's, form and general text display routines.

clear

The clear program clears the screen if this is possible. It looks in the environment for the terminal type and then in the terminfo database to figure out how to clear the screen.

infocmp

The infocmp program can be used to compare a binary terminfo entry with other terminfo entries, rewrite a terminfo description to take advantage of the use= terminfo field, or print out a terminfo description from the binary file (term) in a variety of formats (the opposite of what tic does).

tic

Tic is the terminfo entry-description compiler. The program translates a terminfo file from source format into the binary format for use with the ncurses library routines. Terminfo files contain information about the capabilities of a terminal.

toe

The toe program lists all available terminal types by primary name with descriptions.

tput

The tput program uses the terminfo database to make the values of terminal-dependent capabilities and information available to the shell, to initialize or reset the terminal, or return the long name of the requested terminal type.

tset

The Tset program initializes terminals so they can be used, but it's not widely used anymore. It's provided for 4.4BSD compatibility.

Dependencies

Ncurses-5.2 needs the following to be installed:


sh from the bash package

ar from the binutils package
as from the binutils package
ld from the binutils package

cmp from the diffutils package

chmod from the fileutils package
cp from the fileutils package
ln from the fileutils package
mkdir from the fileutils package
mv from the fileutils package
rm from the fileutils package

c++ from the gcc package
gcc from the gcc package

egrep from the grep package
fgrep from the grep package
grep from the grep package

make from the make package

mawk from the mawk package

sed from the sed package

basename from the sh-utils package
date from the sh-utils package
echo from the sh-utils package
expr from the sh-utils package
test from the sh-utils package
uname from the sh-utils package

cat from the textutils package
sort from the textutils package
tr from the textutils package
wc from the textutils package