aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/p7zip.rb
blob: 7df6f231a762a73204ea0bc74d6a7143d91ac720 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'formula'

class P7zip < Formula
  url 'http://downloads.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2'
  homepage 'http://p7zip.sourceforge.net/'
  md5 'bd6caaea567dc0d995c990c5cc883c89'

  def options
    [["--32-bit", "Build 32-bit only."]]
  end

  def install
    if Hardware.is_32_bit? or ARGV.build_32_bit?
      mv 'makefile.macosx_32bits', 'makefile.machine'
    else
      mv 'makefile.macosx_64bits', 'makefile.machine'
    end

    system "make all3"
    system "make", "DEST_HOME=#{prefix}", "DEST_MAN=#{man}", "install"
  end
end