Thanks for this very useful tutorial.
I have an immediate question regarding the early steps of the process, which are to install the corresponding package, which uncovers missing dependencies, and to install the latter recursively. What happens if the system on which the PBI package is being created already has some of the dependencies for a given package installed? The process described would miss packaging some of the dependencies that may not exist on an end user's system; and testing the resulting PBI package on the originating system may not fail. Could you clarify the process or perhaps give strategies to deal with this kind of situation?
PC-BSD is still a newcomer environment and there is a general lack of PBI packages for many basic applications, so I encourage all fellow readers and PC-BSD users to help create PBI packages for the community.