2014-03-28 00:59:50 +00:00
|
|
|
require "language/haskell"
|
|
|
|
|
|
|
|
class GitAnnex < Formula
|
|
|
|
include Language::Haskell::Cabal
|
|
|
|
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Manage files with git without checking in file contents"
|
2014-03-28 00:59:50 +00:00
|
|
|
homepage "https://git-annex.branchable.com/"
|
2015-04-03 03:34:36 +00:00
|
|
|
url "https://hackage.haskell.org/package/git-annex-5.20150522/git-annex-5.20150522.tar.gz"
|
|
|
|
sha256 "77208899616ed973dca26137534533f03636af6314cbdbfdc3e4e51c5efeec6a"
|
2014-03-28 00:59:50 +00:00
|
|
|
|
2014-05-06 22:52:15 +00:00
|
|
|
bottle do
|
2015-05-27 03:13:16 +00:00
|
|
|
sha256 "4bae9f9d41e97243371d0adc021922955c353aff37b1b8b2ba247dc16f9d19ce" => :yosemite
|
|
|
|
sha256 "796521c204d5da5c2bb149b65bd4685a78798861c4e4da8c7422bfe017e40332" => :mavericks
|
|
|
|
sha256 "9421a63dffda734a5ef9f25c51a6bbac8dcead100c6b6c6d166a98151fc7a501" => :mountain_lion
|
2014-05-06 22:52:15 +00:00
|
|
|
end
|
|
|
|
|
2015-04-03 03:34:36 +00:00
|
|
|
option "with-git-union-merge", "Build the git-union-merge tool"
|
|
|
|
|
2014-03-28 00:59:50 +00:00
|
|
|
depends_on "ghc" => :build
|
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "gsasl"
|
|
|
|
depends_on "libidn"
|
|
|
|
depends_on "gnutls"
|
2015-02-06 20:45:17 +00:00
|
|
|
depends_on "quvi"
|
2014-03-28 00:59:50 +00:00
|
|
|
|
2015-05-29 02:30:10 +00:00
|
|
|
setup_ghc_compilers
|
|
|
|
|
2014-03-28 00:59:50 +00:00
|
|
|
def install
|
|
|
|
cabal_sandbox do
|
|
|
|
cabal_install_tools "alex", "happy", "c2hs"
|
2015-04-03 03:34:36 +00:00
|
|
|
cabal_install "--only-dependencies"
|
2014-03-28 00:59:50 +00:00
|
|
|
cabal_install "--prefix=#{prefix}"
|
2015-04-03 03:34:36 +00:00
|
|
|
|
|
|
|
# this can be made the default behavior again once git-union-merge builds properly when bottling
|
|
|
|
if build.with? "git-union-merge"
|
|
|
|
system "make", "git-union-merge", "PREFIX=#{prefix}"
|
|
|
|
bin.install "git-union-merge"
|
|
|
|
system "make", "git-union-merge.1", "PREFIX=#{prefix}"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "make", "install-docs", "PREFIX=#{prefix}"
|
2014-03-28 00:59:50 +00:00
|
|
|
end
|
2015-04-03 03:34:36 +00:00
|
|
|
cabal_clean_lib
|
2014-03-28 00:59:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
# make sure git can find git-annex
|
2014-07-29 08:04:59 +00:00
|
|
|
ENV.prepend_path "PATH", bin
|
2014-10-25 19:07:52 +00:00
|
|
|
system "git", "annex", "test"
|
2014-03-28 00:59:50 +00:00
|
|
|
end
|
|
|
|
end
|