Subject: Dealing with "secret" subdirectories on the MASTER_SITE
To: None <tech-pkg@netbsd.org>
From: Alan Barrett <apb@iafrica.com>
List: tech-pkg
Date: 08/06/1998 21:07:48
On Thu, 6 Aug 1998, Chris Jones wrote:
> Enclosed is a package for kerberos5-1.0.5.  It has a few minor bugs:
> 
> * It should probably use libtool.  I'm not familiar with libtool, so I
>   didn't do that myself.
> 
> * I couldn't find any simple method of having make automatically
>   retrieve the distribution files.  I had to get those by hand.

The Makefile in NetBSD's security/rsaref package has a special
"do-fetch" rule to deal with the "secret" subdirectory.

The Makefile in FreeBSD's security/krb5 packags has a (more complicated)
"do-fetch" rule to deal with the "secret" subdirectory.

In both cases, the special rules involve fetching a README or similar
file, and searching it (using egrep in one case and awk in another)
for the name of the "secret" subdirectory.

Would it make sense to put that logic into bsd.pkg.mk?  I envisage putting
stuff like this in the package Makefile:

MASTER_SITE_HAS_SECRET_SUBDIR=  YES
FILE_CONTAINING_NAME_OF_SECRET_SUBDIR=          README.KRB5-1.0.5
COMMAND_TO_EXTRACT_NAME_OF_SECRET_SUBDIR=       ${AWK} \
		'(/1\) Change into the directory/) \
			{ if (match($$0, "dist/[0-9]+")) \
			  print substr($$0, RSTART, RLENGTH) }'


--apb (Alan Barrett)