pkgbuild is a tool that showed up in Xcode 3.2 and is now included in default Lion installs. It allows you to make an Apple Package from the command line with a minimum amount of effort. One good use for this tool is creating payload-free packages. These packages typically run a postflight script that runs a desired command on the target volume. Rich Trouton has a writeup on how to create payload-free packages using pkgbuild.