puppetlabs/facter — pull request #105 by glarizza (2011-12-06 01:20:44+00:00)
Title: Build 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.