Make sure that the port rules do exactly what is desired, including packaging up the port. These are the important points to verify:
pkg-plist does not contain
	  anything not installed by the port.
pkg-plist contains everything
	  that is installed by the port.
The port can be installed using the
	  install target.  This verifies
	  that the install script works correctly.
The port can be deinstalled properly using the
	  deinstall target.  This
	  verifies that the deinstall script works correctly.
The port only has access to network resources during the
	  fetch target phase.  This is
	  important for package builders, such as ports-mgmt/poudriere.
Make sure that make package can be
	  run as a normal user (that is, not as
	  root).  If that
	  fails, the software may need to be patched.  See also Section 17.21, “fakeroot” and Section 17.89, “uidfix”.
make stage
make stage-qa
make package
make install
make deinstall
make package (as user)
Make certain no warnings are shown in any of the stages.
Thorough automated testing can be done with
      ports-mgmt/poudriere from the
      Ports Collection, see Section 10.5, “Poudriere” for
      more information.  It maintains jails where
      all of the steps shown above can be tested without affecting the
      state of the host system.
All FreeBSD documents are available for download at https://download.freebsd.org/ftp/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>.