homebrew-core/Formula/git-cola.rb
Brett Koonce 7386ce65f4 git-cola v1.8.1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-01-01 10:31:43 -08:00

35 lines
949 B
Ruby

require 'formula'
class GitCola < Formula
homepage 'http://git-cola.github.com/'
url 'https://github.com/git-cola/git-cola/tarball/v1.8.1'
sha1 '125055ac18f30aa25bf9f0874b888659233ab22e'
head 'https://github.com/git-cola/git-cola.git'
option 'with-docs', "Build man pages using asciidoc and xmlto"
depends_on 'pyqt'
if build.include? 'with-docs'
# these are needed to build man pages
depends_on 'asciidoc'
depends_on 'xmlto'
end
def install
ENV.prepend 'PYTHONPATH', "#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages", ':'
system "make", "prefix=#{prefix}", "install"
if build.include? 'with-docs'
system "make", "-C", "share/doc/git-cola",
"-f", "Makefile.asciidoc",
"prefix=#{prefix}",
"install", "install-html"
end
end
def which_python
"python" + `python -c 'import sys;print(sys.version[:3])'`.strip
end
end