puppetlabs/facter — pull request #143 by glarizza (2012-01-10 22:59:25+00:00)
Title: (#11201) Create a rake task for building Apple packages

The goal is to have our release managers build all Facter packages
within Rake, and so this commit adds a rake task (apple_package) that
will build a DMG-encapsulated package for OS X and put it into the
pkg/apple directory off of the Facter Root.

To accomplish this goal, a folder structure is created in
/tmp/facter/facter-#{version} that mirrors the structure needed for
Apple's Packagemaker CLI tool to build a package for OS X. Next, the
necessary files are copied from the Puppet source into the structure in
/tmp/facter/facter-#{version} and then packagemaker is run
(targeting that folder structure) to build an initial package. Hdiutil
then encapsulates that package into a DMG, and the file is finally
copied into the pkg/apple directory.