5.13. Specifying the Working Directory

Each port is extracted into a working directory, which must be writable. The ports system defaults to having DISTFILES unpack in to a directory called ${DISTNAME}. In other words, if the Makefile has:

PORTNAME=	foo
PORTVERSION=	1.0

then the port's distribution files contain a top-level directory, foo-1.0, and the rest of the files are located under that directory.

A number of variables can overriden if that is not the case.

5.13.1. WRKSRC

The variable lists the name of the directory that is created when the application's distfiles are extracted. If our previous example extracted into a directory called foo (and not foo-1.0) write:

WRKSRC=	${WRKDIR}/foo

or possibly

WRKSRC=	${WRKDIR}/${PORTNAME}

5.13.2. NO_WRKSUBDIR

If the port does not extract in to a subdirectory at all, then set NO_WRKSUBDIR to indicate that.

NO_WRKSUBDIR=	yes

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.