diff options
author | nbm <nbm@FreeBSD.org> | 2001-02-02 15:00:42 +0000 |
---|---|---|
committer | nbm <nbm@FreeBSD.org> | 2001-02-02 15:00:42 +0000 |
commit | 329e649907e1bcc615ee4f4154454a2a31734865 (patch) | |
tree | ef1aed6a322a90b536b4e9849e840d32e4f1844a /Tools/scripts | |
parent | ed0f7a38206a379a3f676ab718eb83b608a6490e (diff) | |
download | FreeBSD-ports-329e649907e1bcc615ee4f4154454a2a31734865.zip FreeBSD-ports-329e649907e1bcc615ee4f4154454a2a31734865.tar.gz |
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>
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-x | Tools/scripts/mkptools/mkpskel | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Tools/scripts/mkptools/mkpskel b/Tools/scripts/mkptools/mkpskel index bc53368..c6e6163 100755 --- a/Tools/scripts/mkptools/mkpskel +++ b/Tools/scripts/mkptools/mkpskel @@ -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"}); |