Chapter 7. Creating binary packages

Table of Contents

7.1. Building a single binary package
7.2. Settings for creation of binary packages

7.1. Building a single binary package

Once you have built and installed a package, you can create a binary package which can be installed on another system with pkg_add(1). This saves having to build the same package on a group of hosts and wasting CPU time. It also provides a simple means for others to install your package, should you distribute it.

To create a binary package, change into the appropriate directory in pkgsrc, and run make package:

$ cd misc/figlet
$ make package

This will build your package (if not already done) and package it into a binary package. You can then use the pkg_* tools to manipulate it. Binary packages are created in PACKAGES, which defaults to /usr/pkgsrc/packages, in the form of a compressed tar file. See Section C.2, “Packaging figlet” for a continuation of the above misc/figlet example.

See Chapter 23, Submitting and Committing for information on how to submit such a binary package.

7.2. Settings for creation of binary packages

See Section 13.17, “Other helpful targets”.