perl-modules: Added Monitoring-Plugin module
[omd.git] / packages / perl-modules / build_module.pl
blobfa3484352a147f2669fb495cf0676c2a484c753e
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Config;
5 use BuildHelper;
7 my $verbose = 0;
8 my $PERL = "/usr/bin/perl";
9 my $TARGET = "/tmp/thruk_p5_dist";
10 my $DISTRO = "";
11 if($ARGV[0] =~ m/perl$/) {
12 $PERL = $ARGV[0]; shift @ARGV;
14 if($ARGV[0] eq '-v') {
15 $verbose = 1; shift @ARGV;
17 if($ARGV[0] eq '-d') {
18 shift @ARGV;
19 $DISTRO = shift @ARGV;
21 if($ARGV[0] eq '-p') {
22 shift @ARGV;
23 $TARGET = shift @ARGV;
26 if(!defined $ENV{'PERL5LIB'} or $ENV{'PERL5LIB'} eq "") {
27 print "dont call $0 directly, use the 'make'\n";
28 exit 1;
31 # catalyst needs this on old perl versions
32 $ENV{'CATALYST_DEVEL_NO_510_CHECK'} = 1;
34 my $x = 1;
35 my $max = scalar @ARGV;
36 for my $mod (@ARGV) {
37 next if $mod =~ m/curl/mxi and $DISTRO =~ m/^CENTOS\ 5/mxi;
38 BuildHelper::install_module($mod, $TARGET, $PERL, $verbose, $x, $max) || exit 1;
39 $x++;
41 exit;