0

There're a lot of formulas like teamviewer that have version number but NOT included in its downloading url (as for teamviewer, it is https://download.teamviewer.com/download/TeamViewer.dmg).

This means, these formulas' upgrading will not reflect on their downloading urls and that will cause an sha256 check failure every time they upgrade.

homebrew-cask eliminate this risk by giving :latest to version and :no_check to sha256,

cask SomeFormula
    version :latest
    sha256 :no_check
    ...
end

So that version number is not a concern and sha256 check will be skipped.

What I need is an equivalent mechanism in linuxbrew.

Does anyone know any related documentation about this? Or any suggestion on how this is achievable in linuxbrew?

Bruce Sun
  • 631
  • 1
  • 10
  • 26

1 Answers1

1

You are thinking of HEAD-only formulas. See this repository for details.

Basically, give it a head stanza and nothing else that implies a version. Example formula:

class Libphenom < Formula
  homepage "https://facebook.github.io/libphenom"
  head "https://github.com/facebook/libphenom.git"

  depends_on "libtool" => :build
  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "pkg-config" => :build
  depends_on "openssl"
  depends_on "concurrencykit"

  def install
    system "./autogen.sh"
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make"
    system "make", "check"
    system "make", "install"
  end
end
user137369
  • 5,219
  • 5
  • 31
  • 54
  • Thank you for your answer. But HEAD only formula seems a different concept. You see, it is mainly for softwares that have no version numbers (they're always the latest versions corresponding to master branch), but in my case, software has a version number, it is just not reflected on their downloading urls. And, HEAD only formulas are deprecated... – Bruce Sun Nov 10 '16 at 05:56
  • HEAD-only formulas are not deprecated. That particular tap is, which is very different. HEAD-only formulas are the only way to achieve what you want: if it is not HEAD-only, it will by definition have a version. – user137369 Nov 10 '16 at 11:35
  • According to [homebrew doc](https://github.com/Homebrew/brew/blob/master/docs/Formula-Cookbook.md), "Homebrew understands git, svn, and hg URLs, and has a way to specify cvs repositories as a URL as well." so I can't go with this approach. – Bruce Sun Nov 11 '16 at 07:29