aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/sleuthkit.rb
blob: 1baaa2ffe236846ee4c535c0b450cac71212a9a4 (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
29
30
31
32
33
34
require 'formula'

class Sleuthkit < Formula
  head 'https://github.com/sleuthkit/sleuthkit.git'
  url 'http://downloads.sourceforge.net/project/sleuthkit/sleuthkit/3.2.3/sleuthkit-3.2.3.tar.gz'
  homepage 'http://www.sleuthkit.org/'
  md5 '29465ebe32cfeb5f0cab83e4e93823c5'

  depends_on 'afflib' => :optional
  depends_on 'libewf' => :optional

  if ARGV.build_head? and MacOS.xcode_version >= "4.3"
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  def patches
    # required for new-ish libewf releases (API change)
    # fixed in the upcoming sleuthkit 4.x
    "http://downloads.sourceforge.net/project/libewf/patches%20for%203rd%20party%20software/sleuthkit/tsk3.2.3-libewf.patch" if !ARGV.build_head?
  end

  def install
    if ARGV.build_head?
      system "glibtoolize"
      system "aclocal"
      system "automake", "--add-missing", "--copy"
      system "autoconf"
    end
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end
end