Skip to content
This repository has been archived by the owner. It is now read-only.

Need tutorial for brew from git #9023

Closed
mankoff opened this issue Dec 7, 2011 · 6 comments

Comments

Projects
None yet
4 participants
@mankoff
Copy link
Contributor

commented Dec 7, 2011

I'm trying to add some packages and following the Formula CookBook, but it only shows how to create formula for tarballs. Some git-specific issues need to be added, like:

  • How do I specify the URL?
  • How do I add an md5 hash when the source comes from a repository that is active?
  • How do I choose a version from git?
@jacknagel

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2011

Look through current formula; note that git checkouts do not need checksums.

@jacknagel

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2011

How do I specify the URL?

url 'git://url.to/git/repo.git'

Note: we prefer https:// over git:// if the checkout comes from github.

How do I choose a version from git?

If it's at all possible to use a versioned tarball, we prefer that. If it can only come from a checkout, then

url 'git://url.to/git/repo.git', :tag => 'tagname'

Formulae can also define head, which is by definition versionless:

head 'git://url.to/git/repo.git'

tough we frown upon 'head-only' formulae.

@Sharpie

This comment has been minimized.

Copy link
Member

commented Dec 7, 2011

Note: we prefer https:// over git:// if the checkout comes from github.

We prefer http: or https: URLs in general over git: URLs because many corporate firewalls block communication that uses the git: protocool.

@jacknagel

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2011

We prefer http: or https: URLs in general over git: URLs because many corporate firewalls block communication that uses the git: protocool.

Sorry, I should have been less specific. :)

I usually just say "github" because there are so many git servers out there that do not have http transport turned on.

@mankoff

This comment has been minimized.

Copy link
Contributor Author

commented Dec 7, 2011

Thanks for the replies. I've tried to follow as best I can. I think this should be in the Formula Cookbook, and/or a link to a simple cmake/git formula should be included as opposed to just autotools and .zip files.

@mankoff mankoff closed this Dec 7, 2011

@adamv adamv reopened this Dec 7, 2011

@adamv

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2011

Re-opening as a reminder to myself to update: https://github.com/adamv/homebrew-cookbook

@ghost ghost assigned adamv Feb 19, 2012

@adamv adamv closed this Jun 8, 2012

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.