On Sat, Jul 12, 2008 at 03:11:18PM -0400, Juan Miscaro wrote:
> Hi, I have a script that I use to automate server installations.
> Every time I come to the point of installing a port with a certain
> flavor:
> 
> postfix with sasl2/mysql
> 
> I can never get it to work.
> 
> I thought I had it working before by putting in the Makefile:
> 
> FLAVORS=     sasl2 mysql
> 
> but this is ignored.
> 
> Putting the following in the script also barfs:
> 
> env FLAVOR="sasl2 mysql"
> 
> What am I missing?

instead of manually setting FLAVOR in your script (btw, FLAVORS is
just a list of available FLAVORs, not what FLAVORs will be built)
or mucking about in the ports Makefiles, you probably want to use
SUBDIRLIST from the top of the ports directory.  for example:

$ echo 'mail/postfix/stable,sasl2,mysql' > /tmp/build-list
$ echo 'another/port' >> /tmp/build-list
$ echo 'one/more,flavored' >> /tmp/build-list
$ echo 'still/another,-subpackage' >> /tmp/build-list
$ cd /usr/ports
$ BULK=Yes FETCH_PACKAGES=Yes SUBDIRLIST=/tmp/build-list make install

see bsd.port.mk(5) and packages-specs(7) for more info.

btw, you can generate a SUBDIRLIST from all installed packages:

$ pkg_info -fa | sed -ne 's/[EMAIL PROTECTED] subdir=\([^ ]*\) .*/\1/p' > 
build-list

although, there is probably a better way to do this with perl.

-- 
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to