Subject: Re: Fetch distfile to different local filename
To: None <tech-pkg@netbsd.org>
From: Amitai Schlair <schmonz@schmonz.com>
List: tech-pkg
Date: 03/03/2002 23:52:46
"Amitai Schlair" <schmonz@schmonz.com> wrote:

> This does exactly what I expect -- downloads the man page into
> ${DIST_SUBDIR} -- but unlike the binaries, there's only one man page,
> and it seems wasteful (and confusing) to have nine distinfo entries for
> one file simply because it could wind up in one of nine places.

I couldn't think of any other way around it, so I made a quick change to
bsd.pkg.mk:

http://netbsd.schmonz.com/patches/fetch-distfile-local-filename.diff

This lets a package say, for example,

DISTFILE_LOCAL.remotename.tar.gz= localname.tar.gz

...which keeps my Perforce package sane. I'm quite surprised that there
hasn't already been some package that needed to be able to do this!

Room for improvement:

o PATCHFILES should probably get the same treatment.

o I don't know much about how fetch-list-one-pkg and friends are used, but
   they probably need to be tweaked similarly.

o FETCH_CMD might be something that doesn't understand "-o outputfile".
   There should probably be a FETCH_CMD_OUTPUTFILE_ARGS that's "-o" by
   default.

o The "-o outputfile" option only really needs to be specified when
   DISTFILE_LOCAL.<whatever> differs from the default.

o More?

Thanks,

- Amitai