GithubHelp home page GithubHelp logo

jordanljohnson / brew-pkg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timsutton/brew-pkg

0.0 0.0 0.0 21 KB

Build macOS installer packages directly from Homebrew formulae

License: MIT License

Ruby 100.00%

brew-pkg's Introduction

brew-pkg

brew-pkg is a Homebrew external command that builds an macOS 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 jordanljohnson/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.

brew-pkg's People

Contributors

timsutton avatar kaloprominat avatar garnierclement avatar izmal avatar jordanljohnson avatar antifuchs avatar jaknz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.