aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rubber.rb
blob: 5ba73e58f8d265c3e949cfe8b70a9f652cd2ef15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'formula'

class Rubber < Formula
  homepage 'https://launchpad.net/rubber/'
  url 'http://launchpad.net/rubber/trunk/1.1/+download/rubber-20100306.tar.gz'
  sha1 'cd382a19cc9fc65d114456ec9d6b042dc0e65b53'

  # Creates missing .in files and adds them to the configure phase
  # otherwise rubber modules are not found after install
  patch do
    url "https://gist.github.com/raw/370408/484d76d042e936053de41fbbe48f5dbdbd1b71b8/fix_rubber_configure.patch"
    sha1 "29173bd22b7ae6216d1255597b6755931df9a33e"
  end

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--mandir=#{man}",
                          "--infodir=#{info}",
                          "--datadir=#{share}"
    system "make"
    system "make install"

    # Don't need to peg to a specific Python version
    Dir["#{bin}/*"].each do |f|
      inreplace f, /^#!.*\/python.*$/, "#!/usr/bin/env python"
    end
  end
end