1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-08 23:06:56 +00:00
freebsd-ports/mail/majordomo/scripts/configure

30 lines
1.0 KiB
Plaintext
Raw Normal View History

#!/usr/bin/perl
#
eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
& eval 'exec /usr/bin/perl -S $0 $argv:q'
if 0;
if( getpwnam( "majordom" ) ) {
( $null, $null, $mjUID ) = getpwnam( "majordom" );
} else {
print "\nMajordomo user not found - aborting!\n\n";
exit 1;
}
if( getgrnam( "majordom" ) ) {
( $null, $null, $mjGID ) = getgrnam( "majordom" );
} else {
print "\nMajordomo group not found - aborting!\n\n";
exit 1;
}
chop( $hostname = `hostname` );
system( "/usr/bin/perl -pi -e 's|%%MJUID%%|$mjUID|g' $ENV{'WRKSRC'}/Makefile" );
system( "/usr/bin/perl -pi -e 's|%%MJGID%%|$mjGID|g' $ENV{'WRKSRC'}/Makefile" );
system( "/usr/bin/perl -pi -e 's|%%HOSTNAME%%|$hostname|g' $ENV{'WRKSRC'}/sample.cf $ENV{'WRKSRC'}/aliases.majordomo" );
1996-12-27 06:25:02 +00:00
foreach $file( "bounce-remind", "contrib/archive_mh.pl", "archive2.pl", "digest", "contrib/digest.num", "contrib/new-list", "contrib/sequencer", "majordomo", "medit", "request-answer", "resend", "sample.cf" ) {
system( "/usr/bin/perl -pi -e 's|%%PREFIX%%|$ENV{'PREFIX'}|g' $ENV{'WRKSRC'}/$file" );
}