pkg_create - a utility for creating software package distributions
Note if the -I option is not given, this script will serve as both the pre-install and the post-install script for the package, differentiating between the functionality by passing the keywords PRE-INSTALL and POST-INSTALL respectively, after the package's name.
Note if the -K option is not given, this script will serve as both the de-install and the post-deinstall script for the package, differentiating between the functionality by passing the keywords DEINSTALL and POST-DEINSTALL respectively, along with the package's name.
Sure to be others.