# Making binary package from installed port



## rambetter (Jan 8, 2011)

I want to make a binary package file (e.g. /usr/ports/packages/All/nmap-5.35.d1.tbz) from a port that is already installed.  The directory structure under /usr/ports/ is already updated (via csup or cvsup) and if I were to build that port from scratch I would get a newer version of the port/package.

For example, "portupgrade -b" allows you to create a package in /usr/ports/packages/All/ for the current port that is installed.  However if I were to do that now it would also upgrade the port.  I just want to create a binary package of what's currently installed.


----------



## rbelk (Jan 8, 2011)

Install bpkg (ports-mgmt/bpkg). Then enter the command [cmd=]bpkg -B <port name>[/cmd] This command will create a package of the port you specified in /var/tmp/bpkg/.


----------



## rambetter (Jan 8, 2011)

Thanks!  It works.


----------



## phoenix (Jan 10, 2011)

pkg_create()  Read the section about *-b*

Already installed as part of the OS.


----------

