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 FLTK library, version 1.1.x, and (for UNIX/Linux) the X11 libraries. 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.
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 FLTK library. The configure script
will look for the fltk-config
utility that comes
with FLTK 1.1.x. Set the FLTKCONFIG environment variable to the
full path of this utility if it cannot be found in the current
path:
setenv FLTKCONFIG /foo/bar/bin/fltk-config ENTER
or:
FLTKCONFIG=/foo/bar/bin/fltk-config ENTER export FLTKCONFIG
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
Operating systems such as MacOS X do not enable the root
account by default. The sudo(8)
command is used
instead:
sudo installation command 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/man1 Installing EPM documentation in /usr/share/doc/epm
Use the sudo
command to install on MacOS X:
sudo make install ENTER Installing EPM setup in /usr/lib/epm Installing EPM programs in /usr/bin Installing EPM manpages in /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.
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
.
Operating System | Name |
---|---|
AIX | aix |
Compaq Tru64 UNIX Digital UNIX OSF/1 |
tru64 |
FreeBSD | freebsd |
HP-UX | hpux |
IRIX | irix |
Linux | linux |
MacOS X | macosx |
NetBSD | netbsd |
OpenBSD | openbsd |
Solaris | solaris |
Processor(s) | Abbreviation |
---|---|
Compaq Alpha | alpha |
HP Precision Architecture | hppa |
INTEL 80x86 | intel |
INTEL 80x86 w/64bit Extensions | x86_64 |
MIPS RISC | mips |
IBM Power PC | powerpc |
SPARC MicroSPARC UltraSPARC |
sparc |
The architecture
string identifies the target
processor. Table 2.2 lists the supported
processors.
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-4.0.rpm |
MacOS X | osx |
open directory/ |
Solaris | pkg |
pkgadd -d directory epm |