aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/task.rb
blob: 28597c24b4c7c2156421db5264ae027f2828ed48 (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
require 'formula'

class Task < Formula
  homepage 'http://www.taskwarrior.org/'
  url 'http://www.taskwarrior.org/download/task-1.9.4.tar.gz'
  md5 '0c5d9dedb1ead69590af895d16708070'

  skip_clean :all

  devel do
    url 'http://www.taskwarrior.org/download/task-2.0.0.RC1.tar.gz'
    md5 '42333fa5a0ab3a6b058146182cbb7b1a'
    version '2.0.0.rc1'
  end

  if ARGV.build_devel?
    depends_on "cmake" => :build
  end

  def install
    if ARGV.build_devel?
      system "cmake", "-DCMAKE_INSTALL_PREFIX=#{prefix}"
    else
      system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    end

    system "make install"
    (etc+'bash_completion.d').install 'scripts/bash/task_completion.sh'
  end
end