Skip to content

Distributing libSBOL with Homebrew

bbartley edited this page Feb 15, 2018 · 1 revision

Homebrew is a convenient package manager for MacOSX. It allows you to distribute libSBOL directly from its GitHub repo, which is then automatically compiled and installed on the user's machine. Instructions for building the package are contained in a Ruby script called a Formula. LibSBOL's Formula is maintained on Homebrew-core in the file libsbol.rb.

Begin by creating your own personal fork of Homebrew-core, or assuming you already have a fork, be sure to sync it with the original repo before proceeding. Now open a new branch. git checkout -b libsbol Open the Formula in a text editor.

Once a new release of libSBOL has been tagged on GitHub, the Formula will need to be updated to point to this latest release. Ctrl-click on the release archive where it says Source code (tar.gz) and copy the link address, e.g., https://github.com/SynBioDex/libSBOL/archive/v2.3.0.0.tar.gz. Overwrite the old release link in the Formula, where it says url. Now, go ahead and download the archive. Get the SHA key as follows: shasum -a 256 ~/Downloads/https://github.com/SynBioDex/libSBOL/archive/v2.1.1.tar.gz Copy this key and overwrite the old key in the Formula, where it says sha256. Typically these are the only changes that are necessary to update the Formula. Do not modify the bottle section, as these will be updated automatically. Save and exit.

If there was an error with the release, you need to provide a new tag. Currently the first 3 version numbers of libSBOL are used for the actual source versioning. The fourth digit is for versioning of brew packages 2.0.0.0 It is totally valid to make a new release due to a packaging error.

Now issue a new pull request, following the instructions at (http://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request.html). A pull request which should contain 1 single commit with only the changes in version number and sha256. If you are working on a PR for a single formula, git commit --amend is a convenient way of keeping your commits squashed as you go.

Clone this wiki locally