T
Teo
Hi,
am using ExtUtils::MakeMaker for the distribution of a Perl script.
The Perl script (not a module a standalone script) is a plugin for a
software tool (Nagios) and has to be installed in a particular
location (e.g., /usr/lib/nagios/plugins/contrib) instead of the
canonical /usr/local/bin on a Unix platform.
This is how one of my many test Makefile.PL looks like:
# Load the Module::Install bundled in ./inc/
use inc::Module::Install;
##############################################################################
# Define metadata (we read it from the binary)
name 'check_dir';
all_from 'check_dir';
##############################################################################
# Specific dependencies
requires 'Carp' => 0;
requires 'English' => 0;
requires 'File::stat' => 0;
requires 'Getopt::Long' => 0;
requires 'Nagios:
lugin' => 0;
requires 'Nagios:
lugin::Threshold' => 0;
requires 'Pod::Usage' => 0;
requires 'version' => 0;
install_script 'check_dir';
WriteMakefile(
INSTALLDIRS => 'site',
INSTALLSITEBIN => '/usr/lib/nagios/plugins/contrib',
INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib',
);
I tried many combinations of INSTALLDIR values and INSTALL* variables
but I was never able to install the script in a place different from /
usr/local/bin.
Any hint?
Many thanks,
Matteo
am using ExtUtils::MakeMaker for the distribution of a Perl script.
The Perl script (not a module a standalone script) is a plugin for a
software tool (Nagios) and has to be installed in a particular
location (e.g., /usr/lib/nagios/plugins/contrib) instead of the
canonical /usr/local/bin on a Unix platform.
This is how one of my many test Makefile.PL looks like:
# Load the Module::Install bundled in ./inc/
use inc::Module::Install;
##############################################################################
# Define metadata (we read it from the binary)
name 'check_dir';
all_from 'check_dir';
##############################################################################
# Specific dependencies
requires 'Carp' => 0;
requires 'English' => 0;
requires 'File::stat' => 0;
requires 'Getopt::Long' => 0;
requires 'Nagios:
requires 'Nagios:
requires 'Pod::Usage' => 0;
requires 'version' => 0;
install_script 'check_dir';
WriteMakefile(
INSTALLDIRS => 'site',
INSTALLSITEBIN => '/usr/lib/nagios/plugins/contrib',
INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib',
);
I tried many combinations of INSTALLDIR values and INSTALL* variables
but I was never able to install the script in a place different from /
usr/local/bin.
Any hint?
Many thanks,
Matteo