Tue, 13 Dec 2005
Generating a SITE_SPECIFIC_PKGS list
This link seems to be the best documentation on using the SPECIFIG_PKGS flag in NetBSD pkgsrc. To use it, you have to generate something that looks like SITE_SPECIFIC_PKGS= mail/mutt-devel security/openssh, i.e., a list with PKGPATH for each package you wish to build.
The next obvious question is "given a particular machine that has all the packages I want (from me adding packages one-by-one) how do I get a list of PKGPATH for each package?" The following seems to work for me:
/usr/sbin/pkg_info | cut -d " " -f 1 | \ xargs /usr/sbin/pkg_info -Q PKGPATH | \ sed 's/^/SITE_SPECIFIC_PKGS+= /' > pkglist
Which generates a list that looks like:
SITE_SPECIFIC_PKGS+= misc/screen SITE_SPECIFIC_PKGS+= pkgtools/pkg_install SITE_SPECIFIC_PKGS+= pkgtools/digest SITE_SPECIFIC_PKGS+= shells/tcsh SITE_SPECIFIC_PKGS+= mail/mutt-devel ...
Posted at: 15:52 | category: /computers/netbsd/pkgsrc | Link