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-09-19 17:44:19 +00:00
|
|
|
url "https://hackage.haskell.org/package/git-annex-5.20150916/git-annex-5.20150916.tar.gz"
|
|
|
|
sha256 "b6f00d6894eb50b469b1898d19f2e138666c732e8d003598dce85cd804f8fadd"
|
2015-09-03 00:26:58 +00:00
|
|
|
head "git://git-annex.branchable.com/"
|
2014-03-28 00:59:50 +00:00
|
|
|
|
2014-05-06 22:52:15 +00:00
|
|
|
bottle do
|
2015-09-19 19:52:18 +00:00
|
|
|
sha256 "61a1d7d3b6144c27cc9dcf4020dfcb0460df6b4241d389e80dbbc33b235050f9" => :el_capitan
|
|
|
|
sha256 "32b077c2ed6cce5a555ca396762f698229860be8bd8b7acc830eb72c59c9e29d" => :yosemite
|
|
|
|
sha256 "0cbd8722827c153b5011fdcf0a7ba6c5fb94fbd549e51ad2c2471954d33eaca0" => :mavericks
|
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
|
2014-03-28 00:59:50 +00:00
|
|
|
end
|
2015-06-24 14:57:14 +00:00
|
|
|
bin.install_symlink "git-annex" => "git-annex-shell"
|
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
|