Installing ports in other places

Matthew Seaman matthew at
Sat Sep 23 05:58:05 UTC 2017

On 22/09/2017 20:55, Paul Schmehl wrote:
> I need to install mediawiki, but I want to install it in a different
> location - in my home directory in a directory named wiki.
> I've read about DESTDIR, but I'm not certain that will work as I intend.
> If I run make install DESTDIR=/homedir/wiki, will the port install as
> /homedir/wiki/mediawiki? Or will it install in /homedir/wiki?

The variable you want is ${PREFIX}.  Try setting PREFIX=${HOME} -- you
should find mediawiki installs into ${HOME}/www/mediawiki

Note: you should still install any dependencies for mediawiki using the
standard PREFIX setting of /usr/local.  You can move those too, but in
that case you will also need to set LOCALBASE so the port searches for
its dependencies in your non-standard location.  (From each ports'
perspective LOCALBASE is where pre-existing stuff comes from and PREFIX
is where new stuff goes to.)



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-ports mailing list