Build.PL
changeset 49 62b17372f2d8
parent 48 a9a9b00be37f
equal deleted inserted replaced
48:a9a9b00be37f 49:62b17372f2d8
     1 use 5.010;
       
     2 use strict;
       
     3 use warnings;
       
     4 use Module::Build;
       
     5 
       
     6 my $builder = Module::Build->new(
       
     7     dist_name         => 'nagios-plugin-dns-delegation',
       
     8     dist_version_from => 'lib/Nagios/Check/DNS/delegation.pm',
       
     9     dist_abstract     => 'nagios check for dns serial numbers',
       
    10 #    PL_files => {
       
    11 #        'plugins/check_dns-delegation.PL' =>
       
    12 #          'nagios/plugins/ius/check_dns-delegation'
       
    13 #    },
       
    14     checks_files      => {
       
    15         'bin/check_dns-delegation' =>
       
    16           'nagios/plugins/ius/check_dns-delegation',
       
    17     },
       
    18     bin_scripts => [glob 'bin/*'],
       
    19     license     => 'perl',
       
    20     requires    => {
       
    21         perl       => '5.14.2',
       
    22         'Net::DNS' => '0.66',
       
    23     },
       
    24     test_requires => {
       
    25         'Test::Exception' => '0.32',
       
    26     },
       
    27 );
       
    28 
       
    29 if (not defined $builder->install_path('nagios')) {
       
    30     my $base = do {
       
    31         if    ($builder->installdirs eq 'vendor') { '/usr/lib' }
       
    32         elsif (defined $builder->install_base)    { $builder->install_base }
       
    33         else                                      { '/usr/local/lib' }
       
    34     };
       
    35     $builder->install_path(nagios => "$base/nagios");
       
    36 }
       
    37 
       
    38 $builder->bindoc_dirs([@{ $builder->bindoc_dirs }, 'blib/nagios/plugins/ius']);
       
    39 $builder->add_build_element('checks');
       
    40 
       
    41 # finally
       
    42 $builder->create_build_script;