setting up a ports infrastructure outside of /usr/ports

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Apr 22 00:31:00 PDT 2004


On Thu, Apr 22, 2004 at 12:11:22AM +0200, Oliver Fischer wrote:
> Hello,
> 
> I would like to ports some programs but before I will start, I would 
> like to have a separate directory for it. So so my question is:
> 
> Is it possible:
> 
> 1. to have the ports directory in my home directory? I
>     think yes.
> 
> 2. to build and to install a port as normal user to
>    a via PREFIX specified directory?
> 
> 3. to use a different pkgdb directory than /var/db/pkg for
>    the ports build in this manner?

Sure.  That's all possible.  When I'm working on ports I just stick
the port directory in my home dir and set up a bunch of environment
variables so I don't trample over the official /var/db/pkg (or try to
-- I work on the development stuff under my own UID, not root).

I generally just source this into my tcsh session:

    # -*- csh -*-
    #
    # Set up environment for testing ports
    
    setenv WRKDIRPREFIX	${HOME}/tmp/ports
    setenv PKG_DBDIR	${HOME}/tmp/db/pkgs
    setenv PORT_DBDIR	${HOME}/tmp/db/ports
    setenv PREFIX		${HOME}/tmp/local
    setenv INSTALL_AS_USER	yes
    setenv NOCLEANDEPENDS	yes
    
    unsetenv JAVA_HOME

Not that this still expects bsd.port.mk and all of the makefiles to
live in /usr/ports/Mk -- as well as any dependency ports.

	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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040422/16a10fad/attachment.bin


More information about the freebsd-ports mailing list