Build and install check_rbl

Dependencies
===========

check_rbl depends on several Perl modules:

 * Capture::Tiny
 * Data::Validate::Domain
 * Data::Validate::IP
 * IO::Select
 * Monitoring::Plugin
 * Monitoring::Plugin::Getopt
 * Monitoring::Plugin::Threshold
 * Net::DNS
 * Net::IP
 * Readonly
 * Socket

Perl modules can be found on the "Comprehensive Perl Archive Network"
(CPAN). The "How to install CPAN modules" guide summarizes how these
can be installed

        http://www.cpan.org/modules/INSTALL.html

On many systems Perl modules are also available as installation
packages (refer to your system documentation on how to install them).

The 'perl Makefile.PL' command (see below) will list the missing
packages the you will need to install.

Install to /usr/lib/nagios/plugins/contrib
==========================================

In the source directory run:

    perl Makefile.PL
    make
    make install

Install to a custom directory (CUSTOM_DIR)
=========================================

In the source directory run:

    perl Makefile.PL INSTALLSITESCRIPT=CUSTOM_DIR
    make
    make install

You can override the INSTALLSCRIPT, INSTALLNBIN or INSTALLSITESCRIPT
variable depending on your perl installation.

The man page is installed to /usr/share/man/man1/check_rbl.1
you can customize the path by setting INSTALLMAN1DIR as follows

    perl Makefile.PL INSTALLSCRIPT=CUSTOM_DIR INSTALLMAN1DIR=CUSTOM_MAN_DIR
    make
    make install

Manual installation
===================

Substitute #!perl at the beginning of the script with the location of
your Perl interpreter and copy it to the desired location

Generate the man page with pod2man

    pod2man check_rbl.pod > CUSTOM_MAN_FILE

Please report any bugs or feature requests through the
web interface at https://github.com/matteocorti/check_rbl/issues

Dependencies on Debian
======================

    apt-get install libdata-validate-ip-perl libdata-validate-domain-perl libnet-dns-perl libreadonly-perl libmonitoring-plugin-perl

Dependencies on Redhat
======================

You can just install the nagios-plugins-check-rbl with DNF and the dependencies will be installed automatically

If yoi want to install the dependencies manually (tested on RHEL8, with repository `epel` and `codeready-builder-for-rhel-8-x86_64-rpms` enabled)

    dnf install perl-Capture-Tiny perl-Data-Validate-IP perl-IO perl-Monitoring-Plugin perl-Net-DNS perl-Net-IP perl-Readonly perl-Socket

The perl libray `Data::Validate::Domain` is not avaliable (_yet_) as package, so you have to install it trough CPAN.

Please check with '`perl -V`' the best value for PERL5LIB.

    dnf install perl-Scope-Guard perl-Sub-Info perl-Module-Pluggable perl-Net-Domain-TLD perl-Test2-Suite perl-Term-Table perl-Test-Simple

    export PERL5LIB=/usr/local/lib64/perl5
    cpanm --verbose --install Data::Validate::Domain
    unset PERL5LIB
