Mail-SpamAssassin

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

';

# check optional module versions
use lib 'lib';
require Mail::SpamAssassin::Util::DependencyInfo;
if (Mail::SpamAssassin::Util::DependencyInfo::long_diagnostics(1) != 0) {
  # This prints a full report of missing required and optional modules and binaries
  # but only exit 0 without creating Makefile if there are missing required binaries.
  # See http://cpantest.grango.org/wiki/CPANAuthorNotes
  # Continuing when there are missing required CPAN modules allows cpan to install them
  # before it runs make on the Makefile
  exit 0;
}

foreach my $file (@FILES_THAT_MUST_EXIST) {
  open (TOUCH, ">>$file") or die "cannot touch '$file'";
  close TOUCH;
}

#######################################################################

# See Bug 6131 & 6598 for changes to META_MERGE and increased requirement 
# for MakeMaker version
#
$makefile{META_MERGE} = {

  'meta-spec' => {
    version => '2',
    url     => 'https://metacpan.org/pod/CPAN::Meta::Spec',
  },

  resources => {
    license     => 'http://www.apache.org/licenses/LICENSE-2.0.html',
    homepage    => 'https://spamassassin.apache.org/',
    bugtracker  => 'https://bz.apache.org/SpamAssassin/',
    repository  => { 
			url=>'http://svn.apache.org/repos/asf/spamassassin/',
			type=>'svn'
		   },
    MailingList => 'http://wiki.apache.org/spamassassin/MailingLists',
  },

  prereqs => {
    runtime => {
      recommends => {
        'MIME::Base64' =>              0,
        'DB_File' =>                   0,
        'Net::SMTP' =>                 0,
        'Net::LibIDN2' =>              0,
        'Net::LibIDN' =>               0,
        'Mail::SPF' =>                 0,
        'MaxMind::DB::Reader' =>       0,
        'MaxMind::DB::Reader::XS' =>   0,
        'IP::Geolocation:MMDB' =>      0,
        'Geo::IP' =>                   0,
        'IP::Country::DB_File' =>      0,
        'IP::Country::Fast' =>         0,
        'Razor2::Client::Agent' =>     2.61,
        'IO::Socket::IP' =>            0.09,
        'IO::Socket::INET6' =>         0,
        'IO::Socket::SSL' =>           1.76,
        'Compress::Zlib' =>            0,
        'Mail::DKIM' =>                0.37,
        'DBI' =>                       0,
        'DBD::SQLite' =>               1.59_01,
        'LWP::Protocol::https' =>      0,
        'Encode::Detect::Detector' =>  0,
        'Net::Patricia' =>             1.16,
        'Net::CIDR::Lite' =>           0,
        'BSD::Resource' =>             0,
        'Archive::Zip' =>              0,
        'IO::String' =>                0,
        'Email::Address::XS' =>        0,
        'Mail::DMARC' =>               0,
      },
    },
    test => {
      recommends => {
        'Net::DNS::Nameserver' =>      0,
        'Devel::Cycle' =>              0,
        'Text::Diff' =>                0,
      },
    },
  },
};

#######################################################################

# Now finish the meta hash and dump the Makefile
$makefile{EXE_FILES} = [ values %{$makefile{EXE_FILES}} ];
$makefile{AUTHOR} =~ s/(<.+) at (.+>)/$1\@$2/;
WriteMakefile(%makefile);
print "Makefile written by ExtUtils::MakeMaker $ExtUtils::MakeMaker::VERSION\n";

#######################################################################

package MY;

our ($MY_GLOBALS_ARE_SANE,
  $RUNNING_ON_WINDOWS,
  @REPOSITORIES,
  $MACRO_RE,
  $EQ_RE,
  $EQ,
  $SELF);

# For some reason initializing the vars on the global scope doesn't work;
# guess its some weird Perl behaviour in combination with bless().
sub init_MY_globals {
  my $self = shift;

  # Keep a reference to ourselves so we don't have to feed it to the helper
  # scripts.
  $SELF = $self;

  return if $MY_GLOBALS_ARE_SANE;
  $MY_GLOBALS_ARE_SANE = 1;

  # (Current) EU::MMs make a difference between these three possible general
  # install destinations. See also
  # <http://archive.develooper.com/perl5-porters@perl.org/msg94113.html>



( run in 1.956 second using v1.01-cache-2.11-cpan-39bf76dae61 )