pkg - global control utility pkg-env - sets up pkg environment for the rest of the tools pkg-new - creates a new package pkg-configure - runs the configure script from the package with the correct settings pkg-make - runs make with correct settings pkg-makeinst - runs "make install" with correct settings pkg-copyout - utility to archive output files from configure, make and make install pkg-empty - removes empty directories in the installed package pkg-link - link in a package into a software tree pkg-local - link in the software tree links into /usr/local pkg-unlink - undoes the results of pkg-link pkg-www - pkg-regression - checks the software tree for integrity
1. Download the software from a distribution site and unpack it in the source directories. Ideally you should unpack into a source directory in the proper collection tree. This way pkg can pick up the collection and package name automatically. If you're maintaining a flat source tree then you'll need to set the collection environment variable (PKG_COLL) or pass in the collection with the -coll argument.
2. CD into the package directory.
2. Run pkg-env. Pay attention to the settings that pkg-env determines. Make sure that it picks up the correct architecture, collection and package names. If you're buidling software that consists entirely of portable scripts then you should specify -common to pkg-env to start a common only install.
3. Run pkg-new. This will create a package directory in the proper architecture and collection. It will also create a package in the common (OS independent) architecture.
4. Read the installation instructions for the software. Substitute all reference to configure, make and make install steps with pkg-configure, pkg-make and pkg-makeinst respectively. Follow the rest of the instructions and write the steps taken into a pkg-name.notes file that you should create either in the package directory or in ~ (home directory).
5. If the installation was successful test the software by running it out of the package directory in the software tree.
6. Run pkg-copyout to copy the .out files and the .notes files into the package/admin directory in the software tree.
7. Run pkg-empty to remove empty directories in the architecture specific and common directories for the package.
8. Run pkg-link to link in the package into the software tree.
9. Run pkg-local -pkgonly to link the current package into /usr/local