On Mon, Oct 13, 2003 at 10:12:07PM -0500, Kevin D. Kinsey, DaleCo, S.P. wrote:
> Michelle wrote:
> 
> >I'm trying to install amanda from the ports collection.  Before 
> >running make, the amanda instructions state to run ./configure 
> >--with-user=amanda --with-group=backup to change the default 
> >configuration.  How do you do this with FreeBSD?  I've tried running 
> >./configure from the /usr/ports/misc/amanda-server directory which 
> >does not work.  Do I need to be in a different directory or is there 
> >another way to change the options before running make?

> You may have a "work" dir underneath the
> path you stated above.  Check in this dir, and
> probably one under it named "amanda-version.number.here"
> for a script entitled "configure."  You should be able to
> run it from there.  However, you run some risk of
> breaking the installation (of Amanda, not FBSD itself...)
> 
> Another alternative *might* be to hack the Makefile
> (in /usr/ports/misc/amanda-server) to reflect the
> config options you want.  Unless you're real
> good at shell scripts, you should make a copy
> first.  Nope, on second thought, make a copy
> first regardless of your 'shellability.'
> 
> All that said, it's likely that the version in
> the ports tree will run best if you leave it
> alone and let it configure itself --- the port
> maintainer should have already read all the
> instructions you've read (and probably some
> others, too...) and has already figured out
> the best way to run it on FBSD, and that info
> should be in the Makefile.

It certainly is in the Makefile for the misc/amander-server port (and
also in the misc/amanda-client port for that matter, because it is a
just slave port of amanda-server):

    % cd /usr/ports/misc/amanda-server
    % make pre-fetch
    
    You may use the following build options:
    
        -DWITH_PLOT to enable ploting, requires X11 libraries
        -DWITH_SAMBA to enable the use of smbclient
        -DWITH_MTX to enable the use of mtx changer scripts
        AMANDA_SERVER=server to specify a server name
            The default is happy-idiot-talk.infracaninophile.co.uk
        AMANDA_TAPE=tape to specify the default tape device
            The default is /dev/nrsa0
        AMANDA_CONFIG=config to specify the default configuration
            The default is user
        AMANDA_USER=user to specify the default user
            The default is operator
        AMANDA_GROUP=group to specify the default group
            The default is operator
        AMANDA_PORTRANGE=low,high to restrict Amanda to TCP ports
            between low and high when connecting from the server
            to the client for data, messages, and indexing.
            The default is no restriction on TCP ports.
        AMANDA_UDPPORTRANGE=low,high to restrict Amanda to UDP ports
            between low and high when connecting from the client
            to the server. Use ports below 1024.
            The default is no restriction on UDP ports.
    

Thus the OP should be able to achieve what she wants by:

    # cd /usr/ports/misc/amanda-server
    # make install AMANDA_USER=amanda AMANDA_GROUP=backup

(and the same for amanda-client if required)

or, if she has been swayed by the blandishments of portupgrade(1)

    # portinstall -m 'AMANDA_USER=amanda AMANDA_GROUP=backup' misc/amanda-server 
misc/amanda-client

although it's generally better to edit the make options into the
/usr/local/etc/pkgtools.conf MAKE_ARGS hash so that those arguments
are always applied when you use portupgrade(1) to keep your ports up
to date.

Most ports will supply make time options to let you choose amongst the
most popular variations.  Many of those will print out a short summary
of the options available as part of the pre-fetch target.  However,
the usage is not consistent across all 10,000 odd ports in the tree
and the most effective way to work out what options are available is
simply to read the ports Makefile.

Also, any port that uses GNU autoconf (ie. it has USE_AUTOCONF in the
Makefile) can pass extra arguments to the 'configure' script by
appending to the CONFIGURE_ARGS or CONFIGURE_ENV make flags:

    # make CONFIGURE_ARGS+='--enable-foo --disable-bar' CONFIGURE_ENV+='CC=gcc'

Nb. It's generally better to use '+=' rather than completely
overriding any value the port Makefile sets already.

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to