Making and Configuring Meta Packages.

By: Chris Roberts:

What is a Meta package?
The Meta Package is a set of packages that are distributed in one structure. Meta Packages can have many features:
  1. Installation Order control.
  2. Required Package enforcement.
  3. Default installation Package Set.

How do I make a Meta Package?
At its simplest form a Meta Package is a directory structure and a set of text files.

The following is the basic structure made by the OSXGNU Meta Package Stub:

The Meta Package Structure is much like a Package the difference is in the .list and .info files.

How to order the installation.
The .list files contains the names of the packages in the Packages directory in the order that they should be installed, from top to bottom.

How to Make a Package Always install.
To enforce the installation of a package you will have to edit the .info file in the package you want to always to be installed. A file will contain the following:
Title package title
Version #####
Description the package description
DefaultLocation /
Diskname (null)
NeedsAuthorization YES
DisableStop NO
UseUserMask NO
Application NO
Relocatable NO
Required NO
InstallOnly NO
RequiresReboot NO
InstallFat NO

By changing the "Required NO" to " Required YES" the package will always be installed by the installer.

Automating the process.
OSX GNU has provided some Perl Scripts that making Meta Packages a bit simpler.

  • mkpkgdir util

    This utility makes the structure for a Meta Package and creates the stubs for the Text files for Welcome, ReadMe, and License.

    a. Make the packages you want to include in the Meta Package. Fill in the package description in the Package Maker dialog, as this will be used in the custom dialog in the Meta Package.

    b. In the terminal cd into your Desktop. Type: mkpkgdir the_name_of_the_meta_package do not use the .mpkg extention in the name of your meta package. replace the "the_name_of_the_meta_package" with the filename of your metapackage without spaces in the name!

    c. Copy all the packages you want to be included in the meta package you made in Step a. in the Packages directory in the the_name_of_the_meta_package directory.

    d. Edit the Text files in the the_name_of_the_meta_package Valid File Types for these files are RTF RTFD HTML TXT only one of each file can exist you can not have two Welcome.XXX files.

  • dompkg util

    After editing the Text files and placing the packages to build into the Meta Package in the Packages directory, this script will build and create a working meta package in the same directory as the directory mkpkgdir program made the stubs.

    a. From the terminal cd into the your Desktop.
    Type: dompkg the_name_of_the_meta_package_stub_directory 'The name of the meta package' Package.version
    The first paramiter is the same name you gave to mkpkgdir.
    The second paramiter is the readable package title enclosed in " ' " single quotes.
    The last paramiter is the version of the meta package no spaces in version.

    b. If there is an order to the packages to be installed you must edit the file the_name_of_the_meta_package.mpkg/the_name_of_the_meta_package.list and place the package names in the order you want.