Skip to content

Instantly share code, notes, and snippets.

@gregneagle
Last active August 29, 2015 14:14
Show Gist options
  • Save gregneagle/0f04cad487ec03293037 to your computer and use it in GitHub Desktop.
Save gregneagle/0f04cad487ec03293037 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Downloads Firefox disk image, builds a package, including autoconfig
resources (typically as generated via the CCK2 tool), then imports the pkg into
your Munki repo.
Place the autoconfig.zip in the same directory as the recipe. You may
optionally use a different name by setting AUTOCONFIG_FILENAME.
Firefox 35 and later require an AUTOCONFIG_DIR of "Contents/Resources";
pre-34 requires "Content/MacOS". Firefox 34 is not supported by this recipe.
ORG_NAME is inserted into the pkg name to distinguish a vanilla
"Firefox-35.0.pkg" from "Firefox_PretendCo-35.0.pkg". You might consider setting
a unique PKG_ID to differentiate your org's "flavor" of Firefox.
Values for RELEASE correspond to directories here:
http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/
Some useful values are:
'latest', 'latest-10.0esr', 'latest-esr', 'latest-3.6', 'latest-beta'
LOCALE corresponds to directories at
http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/$FIREFOX_BUILD/mac/
Examples include 'en-US', 'de', 'ja-JP-mac', 'sv-SE', and 'zh-TW'
No idea if all Firefox builds are available in all the same localizations,
so you may need to verify that any particular combination is offered.</string>
<key>Identifier</key>
<string>com.github.gregneagle.munki.FirefoxAutoconfig</string>
<key>Input</key>
<dict>
<key>MUNKI_REPO_SUBDIR</key>
<string>apps/firefox</string>
<key>NAME</key>
<string>Firefox</string>
<key>pkginfo</key>
<dict>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>description</key>
<string>Mozilla Firefox is a free and open source web browser.</string>
<key>display_name</key>
<string>Mozilla Firefox</string>
<key>name</key>
<string>%NAME%</string>
<key>unattended_install</key>
<true/>
</dict>
</dict>
<key>MinimumVersion</key>
<string>0.4.0</string>
<key>ParentRecipe</key>
<string>com.github.gregneagle.pkg.FirefoxAutoconfig</string>
<key>Process</key>
<array>
<dict>
<key>Arguments</key>
<dict>
<key>repo_subdirectory</key>
<string>%MUNKI_REPO_SUBDIR%</string>
</dict>
<key>Processor</key>
<string>MunkiImporter</string>
</dict>
</array>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Downloads Firefox disk image and builds a package.
Values for FIREFOX_BUILD correspond to directories here: http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/
Some useful values are: 'latest', 'latest-10.0esr', 'latest-esr', 'latest-3.6', 'latest-beta'
LOCALE corresponds to directories at http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/$FIREFOX_BUILD/mac/
Examples include 'en-US', 'de', 'ja-JP-mac', 'sv-SE', and 'zh-TW'
No idea if all Firefox builds are available in all the same localizations, so you may need to verify that any particular
combination is offered.</string>
<key>Identifier</key>
<string>com.github.gregneagle.pkg.FirefoxAutoconfig</string>
<key>Input</key>
<dict>
<key>RELEASE</key>
<string>latest</string>
<key>LOCALE</key>
<string>en_US</string>
<key>NAME</key>
<string>Firefox</string>
<key>AUTOCONFIG_DIR</key>
<string>Contents/Resources/</string>
<key>AUTOCONFIG_FILENAME</key>
<string>autoconfig.zip</string>
<key>ORG_NAME</key>
<string>Customized</string>
</dict>
<key>MinimumVersion</key>
<string>0.4.0</string>
<key>ParentRecipe</key>
<string>com.github.autopkg.download.firefox-rc-en_US</string>
<key>Process</key>
<array>
<dict>
<key>Arguments</key>
<dict>
<key>dmg_path</key>
<string>%pathname%</string>
</dict>
<key>Processor</key>
<string>AppDmgVersioner</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>pkgdirs</key>
<dict>
<key>Applications</key>
<string>0775</string>
</dict>
<key>pkgroot</key>
<string>%RECIPE_CACHE_DIR%/%NAME%</string>
</dict>
<key>Processor</key>
<string>PkgRootCreator</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>destination_path</key>
<string>%pkgroot%/Applications/Firefox.app</string>
<key>source_path</key>
<string>%pathname%/Firefox.app</string>
</dict>
<key>Processor</key>
<string>Copier</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>archive_path</key>
<string>%RECIPE_DIR%/%AUTOCONFIG_FILENAME%</string>
<key>destination_path</key>
<string>%pkgroot%/Applications/Firefox.app/%AUTOCONFIG_DIR%</string>
</dict>
<key>Processor</key>
<string>Unarchiver</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>pkg_request</key>
<dict>
<key>chown</key>
<array>
<dict>
<key>group</key>
<string>admin</string>
<key>path</key>
<string>Applications</string>
<key>user</key>
<string>root</string>
</dict>
</array>
<key>id</key>
<string>org.mozilla.firefox.pkg</string>
<key>options</key>
<string>purge_ds_store</string>
<key>pkgdir</key>
<string>%RECIPE_CACHE_DIR%</string>
</dict>
<key>pkgname</key>
<string>%NAME%_%ORG_NAME%-%version%</string>
</dict>
<key>Processor</key>
<string>PkgCreator</string>
</dict>
</array>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Identifier</key>
<string>local.pkg.FirefoxESRAutoconfig</string>
<key>Input</key>
<dict>
<key>AUTOCONFIG_DIR</key>
<string>Contents/MacOS/</string>
<key>AUTOCONFIG_FILENAME</key>
<string>autoconfig.zip</string>
<key>LOCALE</key>
<string>en_US</string>
<key>NAME</key>
<string>Firefox</string>
<key>ORG_NAME</key>
<string>ESRCustom</string>
<key>RELEASE</key>
<string>latest-esr</string>
</dict>
<key>ParentRecipe</key>
<string>com.github.gregneagle.pkg.FirefoxAutoconfig</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment