Subject: Re: Fetch distfile to different local filename
To: Amitai Schlair <schmonz@schmonz.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 02/28/2002 23:14:25
On Thu, 28 Feb 2002, Amitai Schlair wrote:

> I'm preparing a package of the Perforce command-line client <URL:
> http://www.perforce.com/perforce/products/p4.html>. They only distribute
> binaries, so I have some logic that figures out which one to get (using
> OPSYS/MACHINE_ARCH/OS_VERSION). The result is substituted into MASTER_SITES:
>
> ftp://ftp.perforce.com/pub/perforce/r01.1/bin.${P4_ARCH}/
>
> My problem: the distfile is always just "p4", which means that I can't
> easily download more than one of them, let alone put all 9 checksums in
> distinfo.
>
> To solve this, I think I want to be able to store the downloaded distfile as
> p4.${P4_ARCH}, and then do pkgsrc operations on it as though that had been
> its real name all along. Is this the right idea, and if so, how can I do it?
> (FETCH_BEFORE_ARGS got me only partway there, and seems wrong anyway.)

How about set just set DIST_SUBDIR to "p4/r01.1/${MACHINE_PLATFORM}"?
Then, you'll just have to generate "distinfo" by hand to get all the
variations.

Frederick