• Stars
    star
    196
  • Rank 198,553 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 12 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build OS X installer packages directly from Homebrew formulae

brew-pkg

brew-pkg is a Homebrew external command that builds an OS X installer package from a formula. The formula must first already be installed on the system.

Usage

Assuming nginx is already installed:

brew pkg nginx

==> Creating package staging root using Homebrew prefix /usr/local
==> Staging formula nginx
==> Plist found at homebrew.mxcl.nginx, staging for /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
==> Building package nginx-1.2.6.pkg

It can also automatically include the formula's dependencies:

brew pkg --with-deps --without-kegs ffmpeg

==> Creating package staging root using Homebrew prefix /usr/local
==> Staging formula ffmpeg
==> Staging formula pkg-config
==> Staging formula texi2html
==> Staging formula yasm
==> Staging formula x264
==> Staging formula faac
==> Staging formula lame
==> Staging formula xvid
==> Building package ffmpeg-1.1.pkg

By default behaviour brew pkg include all package kegs located in /usr/local/Cellar/packagename. If you need to exclude it, specify option --without-kegs

Installing it

brew-pkg is available from my formulae tap. Add the tap:

brew tap timsutton/formulae

Then install as any other formula:

brew install brew-pkg

Extras

If a formula has defined a launchd plist, brew-pkg will also install this to the package's root in /Library/LaunchDaemons.

You can also define a custom identifier prefix in the reverse-domain convention with the --identifier-prefix option, ie. brew pkg --identifier-prefix org.nagios nrpe. If there is a launchd plist defined, this same prefix is currently not applied to the plist.

You can set the path to custom preinstall and postinstall scripts with the --scripts option which is just literally passed through to the pkgbuild command.
For more information refer to man pkgbuild which explains that --scripts scripts_path archive the entire contents of scripts-path as the package scripts. If this directory contains scripts named preinstall and/or postinstall, these will be run as the top-level scripts of the package [...].

License

brew-pkg is MIT-licensed.

More Repositories

1

brigadier

Fetch and install Boot Camp ESDs with ease.
Python
2,017
star
2

osx-vm-templates

macOS templates for Packer and VeeWee.
Shell
1,120
star
3

mcxToProfile

Convert macOS property lists, defaults and MCX into Configuration Profiles with Custom Settings payloads
Python
533
star
4

python-macadmin-tools

List of open-source Python-based Mac sysadmin tools
Python
371
star
5

make-profile-pkg

Automate building and integrating OS X installer packages to install Configuration Profiles.
Python
204
star
6

speedwagon

Download iOS/tvOS/watchOS/xrOS simulators without Xcode or macOS
Go
120
star
7

aamporter

Utility to batch download Adobe Creative Suite/Cloud updates and optionally import them into a Munki repository.
Python
86
star
8

make-adobe-cc-license-pkg

Tool for building macOS installer packages and Munki pkginfos for Adobe Creative Cloud license files.
Python
75
star
9

customdisplayprofiles

A command-line utility for setting ColorSync profiles for connected displays on OS X.
Python
66
star
10

scripts

Miscellaneous scripts.
Python
34
star
11

winclone-image-builder

Using Packer and Vagrant to build Windows images automatically
Python
31
star
12

python-macadmins-2015

Python for Mac Admins 2015 talk (MacDevOps, MacDeploy) resources
Python
28
star
13

munki-conditions

Admin-provided conditions for Munki
Python
22
star
14

brewbus

Very simple Omnibus-style OS X installer packages from Homebrew.
Shell
18
star
15

XProtectPackager

Tool to rapidly package and import Apple's XProtect definitions for distribution to clients
Python
16
star
16

brew-stew

Monolithic homebrew packages for dev environment deployment
Python
14
star
17

autopkg-ci

Public AutoPkg CI with Jenkins.
Python
14
star
18

presentation-tools

Tools for doing presentations
Shell
13
star
19

localprofilemanager

Client-side tool for managing OS X Configuration Profiles
Python
12
star
20

packer-startosinstall

Shell
8
star
21

vagrant-bsdpy

A basic Vagrant lab for testing/hacking BSDPy, a Python NetBoot server
Shell
8
star
22

macops.ca

Source for https://macops.ca
HTML
6
star
23

docker-xip

Docker image for unpacking .xip files
Dockerfile
6
star
24

homebrew-formulae

Homebrew formulae.
Ruby
5
star
25

docker-psscriptanalyzer

Shell
5
star
26

jss-vagrant

Simple Vagrant environment for bootstrapping a Casper JSS.
Shell
5
star
27

adobe-ccp-automation

Experimenting with automating CCP
Python
5
star
28

docker-download-xcode

Tools and docker image to automate downloading Xcode
Ruby
4
star
29

pyvideo-urlgrabber

Script to print out video URLs from http://pyvideo.org
Python
4
star
30

uptime

A polyglot `uptime` example to learn some Bazel
Starlark
3
star
31

korsakow-editor

Java
2
star
32

munkibuilds.org

Configuration for munkibuilds.org.
HTML
1
star
33

mas-fetch

Testing fetching OS X installers using argon/mas
Python
1
star
34

datadog-agent-apple-silicon-build

Building the Datadog Agent on Apple Silicon
Shell
1
star
35

Do_not_update-pref_files

1
star