Subject: Custom package sets using pkgsrc
To: None <tech-pkg@netbsd.org>
From: Alistair G. Crooks <agc@westley.demon.co.uk>
List: tech-pkg
Date: 02/21/1999 22:03:15
Since very few people if any routinely use all of the packages in pkgsrc 
(try as I might, I just can't get that much use out of the fidonet ones), I've 
introduced the notion of specific packages to the top-level Makefile of pkgsrc.

Basically, if SPECIFIC_PKGS is defined (in /etc/mk.conf, the environment, or the 
command line), then the contents of SITE_SPECIFIC_PKGS, HOST_SPECIFIC_PKGS, 
GROUP_SPECIFIC_PKGS and USER_SPECIFIC_PKGS will be used instead of looping 
through all the packages within all the categories. The definitions of the 
{SITE,HOST,GROUP,USER}_SPECIFIC_PKGS will almost always be made in /etc/mk.conf
, and contain whitespace-delimited lists of categories and packages (i.e. how 
to get to the package from the top-level pkgsrc directory).

Typically, one would set in /etc/mk.conf:

SITE_SPECIFIC_PKGS= devel/cvs security/ssh sysutils/top

and then the command

# make SPECIFIC_PKGS=1

would build all the specific packages you defined (i.e. devel/cvs, security/
ssh, and sysutils/top). Similarily,

# make

would do a complete build of pkgsrc.

This way, people can customise the groups of packages that they build, but 
still have the opportunity to use the whole pkgsrc tree. Because the 
*_SPECIFIC_PKGS are set in a mk file, they can be conditionally included 
depending on shell commands, host names, existence of files, user ids etc.

The change was all of 6 lines to pkgsrc/Makefile, so I don't foresee many 
problems (apart from the perennial one of congenital stupidity on my part).
However, all bugs should be send-pr'd as usual.

Thanks,
Alistair