15.7. Install additional documentation

If your software has some documentation other than the standard man and info pages that you think is useful for the user, install it under PREFIX/share/doc. This can be done, like the previous item, in the post-install target.

Create a new directory for your port. The directory name should reflect what the port is. This usually means PORTNAME. However, if you think the user might want different versions of the port to be installed at the same time, you can use the whole PKGNAME.

Make the installation dependent to the variable NOPORTDOCS so that users can disable it in /etc/make.conf, like this:

    post-install:
    .if !defined(NOPORTDOCS)
            ${MKDIR} ${PREFIX}/share/doc/xv
            ${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${PREFIX}/share/doc/xv
    .endif

Do not forget to add them to pkg-plist too. (Do not worry about NOPORTDOCS here; there is currently no way for the packages to read variables from /etc/make.conf.)

You can also use the pkg-message file to display messages upon installation. See the using pkg-message section for details.

Note: pkg-message does not need to be added to pkg-plist.

For questions about the FreeBSD ports system, e-mail <ports@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.