Some minor additions so that we act a bit more like NetBSD's url2pkg; we

now autogenerate MASTER_SITES if we're given an URL.  Also check the
PKGMAINTAINER environment variable.

Submitted by:	Tomasz Luchowski <zuntum@eik.pl>
This commit is contained in:
Neil Blakey-Milner 2001-02-02 15:00:42 +00:00
parent feee245a7b
commit 43a1c1abf7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=37909

View file

@ -39,7 +39,7 @@ my (%cap);
chomp($initdir = `pwd`);
$cap{"MAINTAINER"} = ($ENV{"MAINTAINER"} || "ports\@freebsd.org");
$cap{"MAINTAINER"} = ($ENV{"MAINTAINER"} || $ENV{"PKGMAINTAINER"} || "ports\@freebsd.org");
getopts('n');
@ -49,6 +49,7 @@ $filename = $ARGV[0];
if ($filename =~ m#^(f|ht)tp\://#) {
print `fetch $filename`;
$cap{"MASTER_SITES"} = dirname($filename) . '/';
$filename = basename($filename);
}
chdir(dirname($filename));
@ -119,6 +120,11 @@ EOF
}
}
if ($tmp{"MASTER_SITES"}) {
print MAKEFILE "MASTER_SITES= ". $tmp{"MASTER_SITES"} . "\n\n";
delete($tmp{"MASTER_SITES"});
}
print MAKEFILE "\nMAINTAINER=\t" . $tmp{"MAINTAINER"} . "\n\n";
delete($tmp{"MAINTAINER"});