Gangmax Blog

Homebrew Tap

From here, here and here.

Taps are external sources of Homebrew formulae and/or external commands. They can be created by anyone to provide their own formulae and/or external commands to any Homebrew user.

Setup a tap repository

Create a git repository with the following content, for example:

1
2
3
4
5
6
7
# The files under the "Formula" directory are the formulae.
├── Formula
│ └── cairo@1.14.rb
│ └── cmake@3.5.rb
│ └── folly@2016.10.17.00.rb
│ └── …
└──README.md

In this example, the repo is named as “homebrew-repo”. Please keep the “homebrew-“ prefix and you can rename the “repo” part.

Put the git repo to the git server, such as “git@github.com:auser/homebrew-repo.git”.

Add the tap to your homebrew

Run the following command(s) on your mac:

1
2
3
brew tap auser/repo https://github.com/auser/homebrew-repo.git
# You should see the "auser/repo" tap after running the following command:
brew tap

Install formula

1
2
3
4
5
6
7
# Run the following command to install the formula from your tap server:
brew install auser/repo/cairo@1.14
# The above command will install the dependent formulae if required. Try
# to download the dependencies from the same tap server first. If not
# found, it will try the offcial tap then, like "https://homebrew.bintray.com".
# Run the following command to remove the formula:
brew remove cairo@1.14

Remove the tap from Homebrew

1
brew untap auser/repo

Comments