HowTo build and install a port in FreeNAS jail/FreeBSD from source
Make sure that the local ports repository is up-to-date:
- (Only the first time: portsnap fetch extract)
- All other times: portsnap update
(https://www.freebsd.org/doc/handbook/ports-using.html)
Possibly install/update synth if not already done
- cd /usr/ports/ports-mgmt/synth && make install clean
- Only update: synth install ports-mgmt/synth
Make and install the port using synth
- To build with non default configurations:
- Synth uses cached options if they have been saved. Synth will scan these options file before starting a build, and if any are obsolete (number of options don’t match the current port, the option names are different, etc) then it will print out the problematic ports and halt, recommending that the cached options either be removed or re-saved to something valid. To build a package with non-default options, just run “make -C /usr/ports/[category]/[portname] config” before staring a build.
- After you’ve configured the port or to just build and install with default configuration: synth install [category]/[portname]
ReadMe about Synth: https://github.com/jrmarino/synth
FreeBSD forum: https://forums.freebsd.org/threads/54690/