This chapter shows how to configure, build, and install the ESP Package Manager.
EPM requires very little pre-installed software to work. Most
items will likely be provided as part of your OS. Your
development system will need a C compiler, the
make(1)
program (GNU, BSD, and most vendor
make
programs should work), the Bourne (or Korn or
Bash) shell (sh(1)
), and gzip(1)
.
The optional graphical setup program requires a C++ compiler, the X11 libraries, and the FLTK library. FLTK is available at the following URL:
http://www.fltk.org/
Your end-user systems will require the Bourne (or Korn or
Bash) shell (sh
), the df(1)
program,
the tar(1)
program, and the gzip(1)
program to install portable distributions. All but the last are
standard items, and most vendors include gzip
as
well.
Note:
Thegzip
program is only required to uncompress the software distribution .tar.gz file. If you supply the uncompressed .tar file or its contents, thengzip
is not required on the end-user system.
EPM can also generate vendor-specific distributions. These
require the particular vendor tool, such as rpm(8)
and dpkg(8)
, to generate the software distribution
on the development system and load the software distribution on
the end-user system.
EPM uses GNU autoconf(1)
to configure itself for
your system. The configure
script is used to
configure the EPM software, as follows:
./configure ENTER
If the configure
script is unable to determine
the name of your C or C++ compiler, set the CC
and
CXX
environment variables to point to the C and C++
compiler programs, respectively. You can set these variables
using the following commands in the Bourne, Korn, or Bash
shells:
export CC=/foo/bar/gcc ENTER export CXX=/foo/bar/gcc ENTER
If you are using C shell or TCsh, use the following commands instead:
setenv CC /foo/bar/gcc ENTER setenv CXX /foo/bar/gcc ENTER
Run the configure
script again to use the new
commands.
The default installation prefix is /usr, which
will place the EPM programs in /usr/bin, the setup
GUI in /usr/lib/epm, and the man pages in
/usr/man. Use the --prefix
option to
relocate these files to another directory:
./configure --prefix=/usr/local ENTER
The configure
script also accepts the
--bindir
, --libdir
, and
--mandir
options to relocate each directory
separately, as follows:
./configure --bindir=/usr/local/bin --libdir=/usr/local/lib \ --mandir=/usr/local/share/man ENTER
The setup GUI requires the X11 and FLTK libraries. If these
libraries are not provided in standard locations, then the
--with-x-includes
, --with-x-libs
,
--with-fltk-includes
, and
--with-fltk-libs
options can be used to tell the
configure
script where to find them, as
follows:
./configure --with-x-includes=/usr/X11R6/include \ --with-x-libs=/usr/X11R6/lib \ --with-fltk-includes=/usr/local/include \ --with-fltk-libs=/usr/local/lib ENTER
Once you have configured the software, type the following command to compile it:
make ENTER
Compilation should take a few minutes at most. Then type the following command to determine if the software compiled successfully:
make test ENTER Portable distribution build test PASSED. Native distribution build test PASSED.
The test
target builds a portable and native
distribution of EPM and reports if the two distributions were
generated successfully.
Now that you have compiled and tested the software, you can
install it using the make
command or one of the
distributions that was created. You should be logged in as the
super-user unless you specified installation directories for
which you have write permission. The su(8)
command
is usually sufficient to install software:
su ENTER
make
CommandType the following command to install the EPM software using the
make
command:
make install ENTER Installing EPM setup in /usr/lib/epm Installing EPM programs in /usr/bin Installing EPM manpages in /usr/man/cat1 and /usr/man/man1 Installing EPM documentation in /usr/share/doc/epm
The portable distribution can be found in a subdirectory named using the operating system, version, and architecture. For example, the subdirectory for a Linux 2.4.x system on an Intel-based system would be linux-2.4-intel. The subdirectory name is built from the following template:
os-major.minor-architecture
The os
name is the common name for the operating
system. Table 2.1 lists the abbreviations for most operating
systems:
Operating System | Name |
---|---|
AIX | aix |
Compaq Tru64 UNIX Digital UNIX OSF/1 |
tru64 |
FreeBSD | freebsd |
HP-UX | hpux |
IRIX | irix |
Linux | linux |
NetBSD | netbsd |
OpenBSD | openbsd |
Solaris | solaris |
The major.minor
string is the operating system
version number. Any patch revision information is stripped from
the version number, as are leading characters before the major
version number. For example, HP-UX version B.11.11 will result
in a version number string of 11.11
.
The architecture
string identifies the target
processor. Table 2.2 lists the supported processors:
Processor(s) | Abbreviation |
---|---|
Compaq Alpha | alpha |
HP Precision Architecture | hppa |
INTEL 80x86 | intel |
MIPS RISC | mips |
IBM Power PC | powerpc |
SPARC MicroSPARC UltraSPARC |
sparc |
Once you have determined the subdirectory containing the distribution, type the following commands to install EPM from the portable distribution:
cd os-major.minor-architecture ENTER ./epm.install ENTER
The software will be installed after answering a few yes/no questions.
The test
target also builds a distribution in the
native operating system format, if supported. Table 2.3 lists the
native formats for each supported operating system and the command
to run to install the software.
Operating System | Format | Command |
---|---|---|
AIX | aix |
installp -ddirectory epm |
Compaq Tru64 UNIX Digital UNIX OSF/1 |
setld |
setld -a directory??? |
FreeBSD NetBSD OpenBSD |
bsd |
cd directory |
HP-UX | depot |
swinstall -f directory |
IRIX | inst |
swmgr -f directory |
Linux | rpm |
rpm -i directory/epm-3.0.rpm |
Solaris | pkg |
pkgadd -d directory epm |