release preparations for Mail::Ezmlm package:
* update Changes * add version test for ezmlm-make to the Makefile * add configuration for gpg-ezmlm and gpg locations to the Makefile
This commit is contained in:
parent
34438ce978
commit
950a4fbfe6
2 changed files with 106 additions and 6 deletions
|
@ -50,8 +50,9 @@ Revision history for Perl extension Mail::Ezmlm.
|
||||||
0.07.2 Tue Jun 20 01:05:56 UTC 2006
|
0.07.2 Tue Jun 20 01:05:56 UTC 2006
|
||||||
- fixed 'get_charset' and 'set_charset' for idx < 5.0
|
- fixed 'get_charset' and 'set_charset' for idx < 5.0
|
||||||
|
|
||||||
0.08
|
0.08 Thu Oct 2 03:23:06 CEST 2008
|
||||||
- fixed handling of the 'owner' setting for ezmlm-idx > v5
|
- fixed handling of the 'owner' setting for ezmlm-idx > v5
|
||||||
- better ezmlm-idx version detection
|
- updated ezmlm-idx version detection
|
||||||
- admit "@" in the path of a mailing list
|
- allow "@" in the path of a mailing list
|
||||||
|
- add modules Mail::Ezmlm::GpgKeyRing and Mail::Ezmlm::GpgEzmlm
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,15 @@ WriteMakefile(
|
||||||
'CONFIGURE' => \&set_paths,
|
'CONFIGURE' => \&set_paths,
|
||||||
'NAME' => 'Mail::Ezmlm',
|
'NAME' => 'Mail::Ezmlm',
|
||||||
'VERSION_FROM' => 'Ezmlm.pm', # finds $VERSION
|
'VERSION_FROM' => 'Ezmlm.pm', # finds $VERSION
|
||||||
|
'PREREQ_PM' => { 'File::Copy' => 0, 'Crypt::GPG' => 0 },
|
||||||
'DISTNAME' => 'Ezmlm',
|
'DISTNAME' => 'Ezmlm',
|
||||||
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz' },
|
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz' },
|
||||||
'clean' => { FILES => 'ezmlmtmp' }
|
'clean' => { FILES => 'ezmlmtmp' }
|
||||||
);
|
);
|
||||||
|
|
||||||
sub set_paths {
|
sub set_paths {
|
||||||
my($qmail_path, $ezmlm_path);
|
my ($qmail_path, $ezmlm_path, $gpg_ezmlm_path, $gpg_ezmlm_requested);
|
||||||
|
my ($gpg_bin, $gpg_bin_requested);
|
||||||
|
|
||||||
# special case to handle the FreeBSD ports system
|
# special case to handle the FreeBSD ports system
|
||||||
if ($ENV{BSD_BATCH_INSTALL}) {
|
if ($ENV{BSD_BATCH_INSTALL}) {
|
||||||
|
@ -53,6 +55,10 @@ EOM
|
||||||
unless (-e "$ezmlm_path/ezmlm-make") {
|
unless (-e "$ezmlm_path/ezmlm-make") {
|
||||||
print STDERR "Warning: No correct input after $_ attempts. Continuing with warnings ...\n";
|
print STDERR "Warning: No correct input after $_ attempts. Continuing with warnings ...\n";
|
||||||
}
|
}
|
||||||
|
unless (system(("$ezmlm_path/ezmlm-make", "-V")) == 0) {
|
||||||
|
print STDERR "Warning: your version of ezmlm-make does not support the '-V' argument. Please upgrade to ezmlm-idx v0.400 or above.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print << 'EOM';
|
print << 'EOM';
|
||||||
|
|
||||||
|
@ -71,6 +77,60 @@ EOM
|
||||||
print STDERR "Warning: No correct input after $_ attempts. Continuing with warnings ...\n";
|
print STDERR "Warning: No correct input after $_ attempts. Continuing with warnings ...\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# check if gpg-ezmlm is installed (for Mail::Ezmlm::GpgEzmlm)
|
||||||
|
$gpg_ezmlm_requested = prompt('Is gpg-ezmlm installed for encrypted mailing list support? (y/N)', "n");
|
||||||
|
$gpg_ezmlm_requested = ($gpg_ezmlm_requested =~ /^y/i);
|
||||||
|
if ($gpg_ezmlm_requested) {
|
||||||
|
undef $gpg_ezmlm_path;
|
||||||
|
foreach ('/usr/local/bin', '/usr/bin', '/usr/local/bin/gpg-ezmlm',
|
||||||
|
'/usr/bin/gpg-ezmlm') {
|
||||||
|
if (-e "$_/gpg-ezmlm-manage.pl") {
|
||||||
|
$gpg_ezmlm_path = $_;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$gpg_ezmlm_path = '/usr/bin' unless (defined($gpg_ezmlm_path));
|
||||||
|
# ask the user to confirm our guessing
|
||||||
|
foreach (1..10) {
|
||||||
|
$gpg_ezmlm_path = prompt('gpg-ezmlm installation directory?',
|
||||||
|
"$gpg_ezmlm_path");
|
||||||
|
last if (-e "$gpg_ezmlm_path/gpg-ezmlm-manage.pl");
|
||||||
|
print "I can't find $gpg_ezmlm_path/gpg-ezmlm-manage.pl. "
|
||||||
|
. "Please try again\n";
|
||||||
|
}
|
||||||
|
unless (-e "$gpg_ezmlm_path/gpg-ezmlm-manage.pl") {
|
||||||
|
print STDERR "Warning: No correct input after $_ attempts. "
|
||||||
|
. "Continuing with warnings ...\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# check if gpg is installed (for Mail::Ezmlm::GpgKeyRing)
|
||||||
|
$gpg_bin_requested = prompt('Is gnupg installed (for keyring support in encrypted mailing lists)? (y/N)', "n");
|
||||||
|
$gpg_bin_requested = ($gpg_bin_requested =~ /^y/i);
|
||||||
|
if ($gpg_bin_requested) {
|
||||||
|
undef $gpg_bin;
|
||||||
|
foreach ('/usr/local/bin/gpg', '/usr/bin/gpg', '/bin/gpg',
|
||||||
|
'/usr/local/bin/gpg2', '/usr/bin/gpg2', '/bin/gpg2') {
|
||||||
|
if (-x "$_") {
|
||||||
|
$gpg_bin = $_;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$gpg_bin = '/usr/bin' unless (defined($gpg_bin));
|
||||||
|
# ask the user to confirm our guessing
|
||||||
|
foreach (1..10) {
|
||||||
|
$gpg_bin = prompt('Path to the gpg or gpg2 binary?', "$gpg_bin");
|
||||||
|
last if (-x "$gpg_bin");
|
||||||
|
print "I can't find $gpg_bin. Please try again\n";
|
||||||
|
}
|
||||||
|
unless (-x "$gpg_bin") {
|
||||||
|
print STDERR "Warning: No correct input after $_ attempts. "
|
||||||
|
. "Continuing with warnings ...\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# check if mysql support is necessary
|
||||||
if(`strings $ezmlm_path/ezmlm-sub | grep -i 'MySQL'`) {
|
if(`strings $ezmlm_path/ezmlm-sub | grep -i 'MySQL'`) {
|
||||||
|
|
||||||
print << 'EOM';
|
print << 'EOM';
|
||||||
|
@ -107,12 +167,12 @@ Thank you. I will use this information to configure Mail::Ezmlm for you
|
||||||
|
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
|
# set the variables in Ezmlm.pm
|
||||||
# Back up file
|
# Back up file
|
||||||
open(EZMLM, '<Ezmlm.pm') or die "Unable to open Ezmlm.pm for read: $!";
|
open(EZMLM, '<Ezmlm.pm') or die "Unable to open Ezmlm.pm for read: $!";
|
||||||
open(TMP, ">Ezmlm.pm.tmp.$$") or die "Unable to create temp file: $!";
|
open(TMP, ">Ezmlm.pm.tmp.$$") or die "Unable to create temp file: $!";
|
||||||
while(<EZMLM>) { print TMP; }
|
while(<EZMLM>) { print TMP; }
|
||||||
close TMP; close EZMLM;
|
close TMP; close EZMLM;
|
||||||
|
|
||||||
# Do variable substitution
|
# Do variable substitution
|
||||||
open(EZMLM, '>Ezmlm.pm') or die "Unable to open Ezmlm.pm for write: $!";
|
open(EZMLM, '>Ezmlm.pm') or die "Unable to open Ezmlm.pm for write: $!";
|
||||||
open(TMP, "<Ezmlm.pm.tmp.$$") or die "Unable to read temp file: $!";
|
open(TMP, "<Ezmlm.pm.tmp.$$") or die "Unable to read temp file: $!";
|
||||||
|
@ -123,9 +183,48 @@ EOM
|
||||||
print EZMLM;
|
print EZMLM;
|
||||||
}
|
}
|
||||||
close TMP; close EZMLM;
|
close TMP; close EZMLM;
|
||||||
|
|
||||||
unlink "Ezmlm.pm.tmp.$$";
|
unlink "Ezmlm.pm.tmp.$$";
|
||||||
|
|
||||||
|
if ($gpg_ezmlm_requested) {
|
||||||
|
# set the variables in GpgEzmlm.pm
|
||||||
|
# Back up file
|
||||||
|
open(GPGEZMLM, '<Ezmlm/GpgEzmlm.pm')
|
||||||
|
or die "Unable to open Ezmlm/GpgEzmlm.pm for read: $!";
|
||||||
|
open(TMP, ">Ezmlm/GpgEzmlm.pm.tmp.$$") or die "Unable to create temp file: $!";
|
||||||
|
while(<GPGEZMLM>) { print TMP; }
|
||||||
|
close TMP; close GPGEZMLM;
|
||||||
|
# Do variable substitution
|
||||||
|
open(GPGEZMLM, '>Ezmlm/GpgEzmlm.pm')
|
||||||
|
or die "Unable to open Ezmlm/GpgEzmlm.pm for write: $!";
|
||||||
|
open(TMP, "<Ezmlm/GpgEzmlm.pm.tmp.$$")
|
||||||
|
or die "Unable to read temp file: $!";
|
||||||
|
while(<TMP>) {
|
||||||
|
s{^\$GPG_EZMLM_BASE\s*=\s*['"].+?['"]\s*;\s*(#.*|)$}{\$GPG_EZMLM_BASE = '$gpg_ezmlm_path'; # Autoinserted by Makefile.PL};
|
||||||
|
print GPGEZMLM;
|
||||||
|
}
|
||||||
|
close TMP; close GPGEZMLM;
|
||||||
|
unlink "Ezmlm/GpgEzmlm.pm.tmp.$$";
|
||||||
|
}
|
||||||
|
|
||||||
|
# set the variables in GpgKeyRing.pm
|
||||||
|
if ($gpg_bin_requested) {
|
||||||
|
# Back up file
|
||||||
|
open(GPGKEYRING, '<Ezmlm/GpgKeyRing.pm')
|
||||||
|
or die "Unable to open Ezmlm/GpgKeyRing.pm for read: $!";
|
||||||
|
open(TMP, ">Ezmlm/GpgKeyRing.pm.tmp.$$") or die "Unable to create temp file: $!";
|
||||||
|
while(<GPGKEYRING>) { print TMP; }
|
||||||
|
close TMP; close GPGKEYRING;
|
||||||
|
# Do variable substitution
|
||||||
|
open(GPGKEYRING, '>Ezmlm/GpgKeyRing.pm') or die "Unable to open Ezmlm/GpgKeyRing.pm for write: $!";
|
||||||
|
open(TMP, "<Ezmlm/GpgKeyRing.pm.tmp.$$") or die "Unable to read temp file: $!";
|
||||||
|
while(<TMP>) {
|
||||||
|
s{^\$GPG_BIN\s*=\s*['"].+?['"]\s*;\s*(#.*|)$}{\$GPG_BIN = '$gpg_bin'; # Autoinserted by Makefile.PL};
|
||||||
|
print GPGKEYRING;
|
||||||
|
}
|
||||||
|
close TMP; close GPGKEYRING;
|
||||||
|
unlink "Ezmlm/GpgKeyRing.pm.tmp.$$";
|
||||||
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue