Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add homebrew recipe #13

Open
cchacin opened this issue Sep 30, 2014 · 12 comments
Open

chore: add homebrew recipe #13

cchacin opened this issue Sep 30, 2014 · 12 comments

Comments

@cchacin
Copy link

cchacin commented Sep 30, 2014

I don't have experience on that but I'll do my best try

@cburgdorf
Copy link
Contributor

That would be great!

@cchacin
Copy link
Author

cchacin commented Oct 1, 2014

@cburgdorf we have two different approaches here:

  • (easiest but not the better) Create a binary formula in hombrew-binary repository
  • Create a source formula in hombrew repository, to do that we need:
    • Package the source as .tar.gz or something like that and must be available from URL. i.e. (Github releases can be a choice)
    • provide a installation tool like cmake (cargo is not available in rust 0.11.0), or better is to maintain a binary folder in this repository with the clog binary file

I have a branch with some advances: https://github.com/cchacin/homebrew/tree/clog

require "formula"

class Clog < Formula
  homepage "https://github.com/thoughtram/clog"
  url "http://blog.thoughtram.io/clog/0.2.0/clog"
  version "0.2.0"
  sha1 "5087032012bb92d7652059d7693e3df5c1833ac0"

  def install
    # Install files
    libexec.install Dir["*"]
    bin.install_symlink "#{libexec}/clog" => "clog"
  end

  def caveats; <<-EOS.undent
    Usage:
      clog [--repository=<link> --setversion=<version> --subtitle=<subtitle>
            --from=<from> --to=<to> --from-latest-tag]

    Options:
      -h --help               Show this screen.
      --version               Show version
      -r --repository=<link>  e.g https://github.com/thoughtram/clog
      --setversion=<version>  e.g. 0.1.0
      --subtitle=<subtitle>   e.g. crazy-release-name
      --from=<from>           e.g. 12a8546
      --to=<to>               e.g. 8057684
      --from-latest-tag       uses the latest tag as starting point. Ignores other --from parameter
    EOS
  end

  test do
    system "#{bin}/clog -h | grep #{version}"
  end
end

what do you think?

@cchacin
Copy link
Author

cchacin commented Oct 1, 2014

PR in homebrew-binary https://github.com/Homebrew/homebrew-binary/pull/153

@cburgdorf
Copy link
Contributor

Looks good for now. We are still lacking a robust approach for generating the binaries. My plan is to generate binaries for all platforms and directly upload them somewhere without any manual work. But this seems to be especially tricky for windows.

Anyway, when this happens we could just change the formula to fetch the binary from somewhere else.

@cburgdorf
Copy link
Contributor

Now that clog is on crates.io I wonder if we can revisit this issue? Will it be easier to come up with a formula now?

@kbknapp
Copy link
Member

kbknapp commented Jun 4, 2015

I've put up two pre-compiled binaries (OS X and Linux) on a VPS. I've got 1TB of transfer, so I don't mind hosting it there until I chew through that bandwidth.

http://wod.twentyfives.net/bin/clog/clog-v0.7.0_osx-x64.tar.gz
http://wod.twentyfives.net/bin/clog/clog-v0.7.0_linux-x64.tar.gz

If someone wants to make a clog-bin for Arch AUR that's possible too.

@kbknapp
Copy link
Member

kbknapp commented Jun 4, 2015

Also just added a windows binary

http://wod.twentyfives.net/bin/clog/clog-v0.7.0_windows-x64.zip

Which should take care of #12

@cburgdorf
Copy link
Contributor

Yay, your hosted linux binaries just saved my ass 👍

@kbknapp
Copy link
Member

kbknapp commented Jun 26, 2015

👍

@0x-r4bbit 0x-r4bbit changed the title Homebrew recipe chore: add homebrew recipe Jul 13, 2015
@franklinkim
Copy link

+1

@kbknapp
Copy link
Member

kbknapp commented Nov 20, 2015

Now that cargo install is a thing, you can install via cargo install clog-cli

There is also cargo-brew which I believe is a cargo install like clone integrating with brew where you can install via cargo brew clog-cli

@remyleone
Copy link

homebrew is still very much relevant to keeping a binary up to date :) Hope this issue will get some attention soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants