aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/autopsy.rb
blob: ff3581d8ad858468b4302e779fae705a04a36d89 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
require 'formula'

class Autopsy < Formula
  homepage 'http://www.sleuthkit.org/autopsy/index.php'
  url 'https://downloads.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz'
  sha1 '084a6554a1494f5f34df4a5a3635c8d3dc3b8822'

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

  # fixes weird configure script that wouldn't work nicely with homebrew
  patch :DATA

  def autcfg; <<-EOS.undent
    # Autopsy configuration settings

    # when set to 1, the server will stop after it receives no
    # connections for STIMEOUT seconds.
    $USE_STIMEOUT = 0;
    $STIMEOUT = 3600;

    # number of seconds that child waits for input from client
    $CTIMEOUT = 15;

    # set to 1 to save the cookie value in a file (for scripting)
    $SAVE_COOKIE = 1;

    $INSTALLDIR = '#{prefix}';


    # System Utilities
    $GREP_EXE = '/usr/bin/grep';
    $FILE_EXE = '/usr/bin/file';
    $MD5_EXE = '/sbin/md5';
    $SHA1_EXE = '/usr/bin/shasum';


    # Directories
    $TSKDIR = '/usr/local/bin/';

    # Homebrew users can install NSRL database and change this variable later
    $NSRLDB = '';

    # Evidence locker location
    $LOCKDIR = '#{var}/lib/autopsy';
    EOS
  end

  def install
    (var+"lib/autopsy").mkpath
    mv 'lib', 'libexec'
    prefix.install %w{ global.css help libexec pict }
    prefix.install Dir['*.txt']
    (prefix+"conf.pl").write autcfg
    inreplace 'base/autopsy.base', '/tmp/autopsy', prefix
    inreplace 'base/autopsy.base', 'lib/define.pl', "#{libexec}/define.pl"
    bin.install 'base/autopsy.base' => 'autopsy'
  end

  def caveats; <<-EOS.undent
    By default, the evidence locker is in:
      #{var}/lib/autopsy
    EOS
  end
end

__END__
diff --git a/base/autopsy.base b/base/autopsy.base
index 3b3bbdc..a0d2632 100644
--- a/base/autopsy.base
+++ b/base/autopsy.base
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -wT
+use lib '/tmp/autopsy/';
+use lib '/tmp/autopsy/libexec/';
 #
 # autopsy gui server
 # Autopsy Forensic Browser