Unix validation tools: Configuration and installation

The installation routines are hand-made. I know: thats bad ;-) That's why one of the most important tasks on my to do list is to implement an installation procedure conforming to the "Perl way". But I wanted to present an installation yet without torturing you with a list of cp, chmod, sed or other shell commands. I built a Perl script and a Makefile, which contain the nesseccary commands and some checks for pathnames, Perl modules and other stuff. I hope you can live with it, in the meantime I will study the ExtUtils::MakeMaker documentation.

Here is a quick reference how to configure and install the tools:

And so it looks in a terminal when you follow the steps:

  jan@jack:~/sysvtools/install> tar xzf SysVTools.tgz
  jan@jack:~/sysvtools/install> cd SysVTools
  jan@jack:~/sysvtools/install/SysVTools> perl ./configure.pl PREFIX=/home/jan/sysvtools
  perl executable ... /usr/bin/perl
  perl version ... 5.8.3
  check for module POSIX::strptime
  check for module Locale::gettext
  library path .. /home/jan/sysvtools/lib
  binary path .. /home/jan/sysvtools/bin
  manual path .. /home/jan/sysvtools/man
  locale path .. /home/jan/sysvtools/locale
  creating Makefile .. done
  call 'make install_lib' to only install the modules and documentation
  call 'make all' or 'make' to install the modules, documentation and the binaries
  jan@jack:~/sysvtools/install/SysVTools> make
  ...

After extracting the archive you will find the following files in the SysVTools directory:

  SysVTools
  |-- Changes                     # log of changes
  |-- INSTALL                     # installation description
  |-- LICENSE                     # the GNU GPL
  |-- MANIFEST                    # list of package files
  |-- Makefile.in                 # Makefile template
  |-- Todo                        # a list of tasks to do
  |-- bin
  |   `-- sysvtools.pl            # the tools program
  |-- configure.pl                # the configuration program
  |-- install
  |-- lib
  |   `-- JT
  |       `-- CLI
  |           |-- Pager.pm        # the Pager module
  |           `-- SysVTools.pm    # the SysVTools module
  |-- locale
  |   |-- de
  |   |   |-- LC_MESSAGES
  |   |   |   `-- SysVTools.mo    # the german message catalogue
  |   |   `-- SysVTools.po        # the source of the german message catalogue
  |   `-- en
  |       |-- LC_MESSAGES
  |       |   `-- SysVTools.mo    # the english message catalogue
  |       `-- SysVTools.po        # the source of the english message catalogue
  `-- man
      |-- man1
      |   `-- sysvtools.1.gz      # the sysvtools manual page
      `-- man3
          |-- Pager.3pm.gz        # the Pager module manual page
          `-- SysVTools.3pm.gz    # the SysVTools module manual page

To configure the package according to your requirements call the configure.pl perl script. You must execute it this way: perl ./configure.pl [options]. The program checks some system requirements, tries to evaluate nesseccary pathnames and creates the Makefile from the template Makefile.in. When you execute it without any options, it will try to get all information from your system. You can overwrite this with the following options:

The configuration programm in detail performs the following steps:


When configuration is done successfully, you install the package simply by calling make [Target]. Without options all package components are installed. The following targets are available:

A complete installation will create the following files on your machine:

  [PREFIX/bin] or [BINPATH]
    |-- ckcont     -> sysvtools.pl
    |-- ckdate     -> sysvtools.pl
    |-- ckgid      -> sysvtools.pl
    |-- ckint      -> sysvtools.pl
    |-- ckitem     -> sysvtools.pl
    |-- ckkeywd    -> sysvtools.pl
    |-- ckpath     -> sysvtools.pl
    |-- ckrange    -> sysvtools.pl
    |-- ckstr      -> sysvtools.pl
    |-- cktime     -> sysvtools.pl
    |-- ckuid      -> sysvtools.pl
    |-- ckyorn     -> sysvtools.pl
    |-- errange    -> sysvtools.pl
    |-- errdate    -> sysvtools.pl
    |-- errgid     -> sysvtools.pl
    |-- errint     -> sysvtools.pl
    |-- erritem    -> sysvtools.pl
    |-- errpath    -> sysvtools.pl
    |-- errstr     -> sysvtools.pl
    |-- errtime    -> sysvtools.pl
    |-- erruid     -> sysvtools.pl
    |-- erryorn    -> sysvtools.pl
    |-- helpdate   -> sysvtools.pl
    |-- helpgid    -> sysvtools.pl
    |-- helpint    -> sysvtools.pl
    |-- helpitem   -> sysvtools.pl
    |-- helppath   -> sysvtools.pl
    |-- helprange  -> sysvtools.pl
    |-- helpstr    -> sysvtools.pl
    |-- helptime   -> sysvtools.pl
    |-- helpuid    -> sysvtools.pl
    |-- helpyorn   -> sysvtools.pl
    |-- sysvtools.pl
    |-- valdate    -> sysvtools.pl
    |-- valgid     -> sysvtools.pl
    |-- valint     -> sysvtools.pl
    |-- valpath    -> sysvtools.pl
    |-- valrange   -> sysvtools.pl
    |-- valstr     -> sysvtools.pl
    |-- valtime    -> sysvtools.pl
    |-- valuid     -> sysvtools.pl
    `-- valyorn    -> sysvtools.pl
  [PREFIX/lib] or [LIBPATH]
    `-- JT
        `-- CLI
            |-- Pager.pm
            `-- SysVTools.pm
  [PREFIX/locale] or [MOPATH]
    |-- de
    |   `-- LC_MESSAGES
    |       `-- SysVTools.mo
    `-- en
        `-- LC_MESSAGES
            `-- SysVTools.mo
  [PREFIX/man] or [MANPATH]
    |-- man1
    |   `-- sysvtools.1.gz
    `-- man3
        |-- JT::CLI::Pager.3pm.gz
        `-- JT::CLI::SysVTools.3pm.gz