Chapter 15. Dos and Don'ts

Table of Contents
15.1. Strip Binaries
15.2. INSTALL_* macros
15.3. WRKDIR
15.4. WRKDIRPREFIX
15.5. Differentiating operating systems and OS versions
15.6. Writing something after bsd.port.mk
15.7. Install additional documentation
15.8. DIST_SUBDIR
15.9. Package information
15.10. RCS strings
15.11. Recursive diff
15.12. PREFIX
15.13. Subdirectories
15.14. Cleaning up empty directories
15.15. UIDs
15.16. Do things rationally
15.17. Respect CFLAGS
15.18. Configuration files
15.19. Portlint
15.20. Feedback
15.21. README.html
15.22. Miscellanea
15.23. If you are stuck...

Here is a list of common dos and don'ts that you encounter during the porting process.You should check your own port against this list, but you can also check ports in the PR database that others have submitted. Submit any comments on ports you check as described in Bug Reports and General Commentary. Checking ports in the PR database will both make it faster for us to commit them, and prove that you know what you are doing.

15.1. Strip Binaries

Do strip binaries. If the original source already strips the binaries, fine; otherwise you should add a post-install rule to it yourself. Here is an example:

    post-install:
            strip ${PREFIX}/bin/xdl

Use the file(1) command on the installed executable to check whether the binary is stripped or not. If it does not say not stripped, it is stripped.

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