Chapter 2. Making a New Port

Interested in making a new port, or upgrading existing ports? Great!

What follows are some guidelines for creating a new port for FreeBSD. To upgrade an existing port, read this, then read Chapter 10, Upgrading a Port.

When this document is not sufficiently detailed, refer to /usr/ports/Mk/bsd.port.mk, which is included by all port Makefiles. Even those not hacking Makefiles daily can gain much knowledge from it. Additionally, specific questions can be sent to the FreeBSD ports mailing list.

Note:

Only a fraction of the variables (VAR) that can be overridden are mentioned in this document. Most (if not all) are documented at the start of /usr/ports/Mk/bsd.port.mk; the others probably ought to be. Note that this file uses a non-standard tab setting: Emacs and Vim will recognize the setting on loading the file. Both vi(1) and ex(1) can be set to use the correct value by typing :set tabstop=4 once the file has been loaded.

Looking for something easy to start with? Take a look at the list of requested ports and see if you can work on one (or more).

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 <[email protected]>.
Send questions about this document to <[email protected]>.