Mail-SpamCannibal

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

###########################################################
##          if built from a parent directory,             #
##      at install, the parent Makefile must execute      #
##                                                        #
##  @cd SpamCannibal && $(MAKE) install_daemon $(PASTHRU) #
##  @cd SpamCannibal && $(MAKE) clean_CTest $(PASTHRU)    #
##                                                        #
###########################################################

use Config;
use vars qw($CONFIG);
use Cwd qw(abs_path);

unless ($Config{osname} =~ /linux/i) {
  print STDERR "unsupported operating system $Config{osname}\n";
  exit 0;
}
unless (require IPTables::IPv4::DBTarpit) {
  print STDERR "Missing OS dependent module IPTables::IPv4::DBTarpit\n";
  exit 0;
}
require IPTables::IPv4::DBTarpit::Inst;
import IPTables::IPv4::DBTarpit::Inst qw(:all);

my $conf = 'config.db';
my $home = abs_path('./');
my $localconf = $home .'/'. $conf;

my $configtxt;

if ((caller)[1]) {
  hard_fail("Do not MAKE ". __PACKAGE__ ." as a sibling process
it contains directory sensitive components.");
}

my $pv = sprintf "%vd", $^V;
unless ($pv lt '5.8.0' || $pv gt '5.8.5') {
  print
"
################################################################
######################### WARNING ##############################
#                                                              #
# Early versions of perl 5.8.x contain bugs that cause certain #
# \@_ operations to fail. Please upgrade to at least perl 5.8.6 #
#                                                              #
################################################################

press ENTER:";
  readline *STDIN;
  print "\n";
}

$configtxt = do 'inst/dialog.pl';
$CONFIG = do 'config.db';

my($uid,$gid) = (getpwnam($CONFIG->{SPAMCANNIBAL_USER}))[2,3];

hard_fail('Can not find password file entry for user '. $CONFIG->{SPAMCANNIBAL_USER} .'
You must create the user and directory structure
before running this installation procedure.
') unless $CONFIG->{SPAMCANNIBAL_USER} && $uid && $gid;

# pull in pod pages for external support modules
my %xmodules = (
  'Geo::IP::PurePerl'			=> 'Geo-IP-PurePerl',
  'Geo::CountryFlags'			=> 'Geo-CountryFlags',
  'Data::Password::Manager'		=> 'Data-Password-Manager',
  'File::SafeDO'			=> 'File-SafeDO',
  'IPTables::IPv4::DBTarpit'		=> 'IPTables-IPv4-DBTarpit',
  'IPTables::IPv4::DBTarpit::Tools'	=> 'IPTables-IPv4-DBTarpit-Tools',
  'IPTables::IPv4::DBTarpit::Inst'	=> 'IPTables-IPv4-DBTarpit-Inst',
  'IPTables::IPv4::DBTarpit::SiteConfig'=> 'IPTables-IPv4-DBTarpit-SiteConfig',
  'LaBrea::Tarpit'			=> 'LaBrea-Tarpit',
  'LaBrea::Tarpit::Report'		=> 'LaBrea-Tarpit-Report',
  'Net::DNS::Codes'			=> 'Net-DNS-Codes',
  'Net::DNS::ToolKit'			=> 'Net-DNS-ToolKit',
  'Net::DNS::ToolKit::RR'		=> 'Net-DNS-ToolKit-RR',
  'Net::DNS::ToolKit::RR::Template'	=> 'Net-DNS-ToolKit-RR-Template',
  'Net::DNS::ToolKit::Question'		=> 'Net-DNS-ToolKit-Question',
  'Net::DNS::ToolKit::Utilities'	=> 'Net-DNS-ToolKit-Utilities',
  'Net::DNSBL::MultiDaemon'		=> 'Net-DNSBL-MultiDaemon',
  'Net::DNSBL::Utilities'		=> 'Net-DNSBL-Utilities',
  'Net::SMTP'				=> 'Net-SMTP',
  'Net::Whois::IP'			=> 'Net-Whois-IP',
  'NetAddr::IP::Lite'			=> 'NetAddr-IP-Lite',
  'Proc::PidUtil'			=> 'Proc-PidUtil',
  'Sys::Hostname::FQDN'			=> 'Sys-Hostname-FQDN',
);

my %xpmfiles;
foreach(keys %xmodules) {



( run in 1.051 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )