homebrew-core/Formula/keybase.rb
Alex Dunn 8f707133eb keybase 0.7.8
Closes Homebrew/homebrew#39163.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-04-30 23:49:34 -04:00

28 lines
853 B
Ruby

class Keybase < Formula
homepage "https://keybase.io/"
url "https://github.com/keybase/node-client/archive/v0.7.8.tar.gz"
sha256 "87fda71a1559e418ba67d64eeca29b7e0caa4a7696de130bd2da7379da3a62aa"
head "https://github.com/keybase/node-client.git"
depends_on "node"
depends_on :gpg
def install
# remove self-update command
# https://github.com/keybase/keybase-issues/issues/1477
rm "lib/command/update.js"
inreplace "lib/command/all.js", '"update", ', ""
inreplace "lib/req.js", "keybase-installer", "brew update && brew upgrade keybase"
libexec.install Dir["*"]
(bin/"keybase").write <<-EOS.undent
#!/bin/sh
export KEYBASE_BIN="#{bin}/keybase"
exec "#{Formula["node"].opt_bin}/node" "#{libexec}/bin/main.js" "$@"
EOS
end
test do
system "#{bin}/keybase", "id", "maria"
end
end