# -*- perl -*- use strict; require 5.005; use ExtUtils::MakeMaker (); use Getopt::Long (); sub Usage { print <<"EOF"; Usage: $0 Possible options are: --antivir-path=

Set path of antivir binary; 'none' to disable --debug Turn on debugging mode --facility= Set syslog facility --gzip-path=

Set path of gzip binary; 'none' to disable --help Print this message --lha-path=

Set path of unarj binary; 'none' to disable --mail-user= Set UID under which sendmail executes external binaries --mail-group= Set GID under which sendmail executes external binaries --mail-host= Set host to use for delivering mails --my-mail= Set email address being used in reports --noprompt Suppress prompting the user --pid-file=

Set path of PID file --php-path=

Set path of pgp binary; 'none' to disable --sendmail-path=

Set path of sendmail binary; 'none' to disable --tar-path=

Set path of tar binary; 'none' to disable --tmp-dir=

Set path of spool directory --unarj-path=

Set path of unarj binary; 'none' to disable --unix-sock=

Set path of unix socket --domain= Set domain being added to unqualified email adresses --unzip-path=

Set path of unzip binary; 'none' to disable --verbose Turn on verbose mode See "perldoc ExtUtils::MakeMaker" for generic options. EOF exit 1; } use vars qw($debug $verbose $prompt); $prompt = 1; Getopt::Long::Configure('pass_through'); Getopt::Long::GetOptions('debug' => \$debug, 'verbose' => \$verbose, 'prompt!' => \$prompt, 'help' => \&Usage); my %prereq = ( "IO::Scalar" => 1.113, "MIME::Tools" => 4.116, "IO::Tee" => 0.61 ); use lib "lib"; # Create a config file. Make sure this is successfull, so that we # get a Makefile anyways. This is required by the automatic CPAN # installation. my $cfg = eval { require Mail::IspMailGate::Install; $Mail::IspMailGate::Install::config = 1; Mail::IspMailGate::Install->Config(); }; my $unixSock = $cfg ? $cfg->{'unix_sock'} : ''; ExtUtils::MakeMaker::WriteMakefile ('NAME' => 'Mail::IspMailGate', 'EXE_FILES' => ['ispMailGateD'], 'VERSION_FROM' => 'lib/Mail/IspMailGate/Install.pm', 'dist' => { 'SUFFIX' => ".gz", 'DIST_DEFAULT' => 'all tardist', 'COMPRESS' => "gzip -9vf" }, 'clean' => { 'FILES' => 'output ispMailGate ispMailGateD' }, 'DEFINE' => $unixSock ? q{-DPATH_UNIXSOCK=\"}.$unixSock.q{\"} : "", 'INC' => '-I$(PERL_INC)', 'linkext' => {'LINKTYPE' => ''}, 'ABSTRACT' => "A general purpose filtering MDA for sendmail", 'AUTHOR' => 'Jochen Wiedmann ', 'PREREQ_PM' => \%prereq ); package MY; sub postamble { qq{ all :: README\n\nREADME: ispMailGateD \tperldoc -t ispMailGateD >README install :: \t\$(PERL) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) -MMail::IspMailGate::Install -e Install }; } sub libscan { my($self, $path) = @_; ($path =~ /\~$/) ? undef : $path; }