Subject: Fetch distfile to different local filename
To: None <tech-pkg@NetBSD.ORG>
From: Amitai Schlair <schmonz@schmonz.com>
List: tech-pkg
Date: 02/28/2002 22:54:56
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.)

Thanks,

- Amitai