mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
30 lines
1.0 KiB
Perl
30 lines
1.0 KiB
Perl
#!/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" );
|
|
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" );
|
|
}
|