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

class MPlayerPresented < Requirement
  fatal true
  default_formula 'mplayer'

  satisfy { which('mplayer') || which('mplayer2') }
end

class Mplayershell < Formula
  homepage 'https://github.com/donmelton/MPlayerShell'
  url 'https://github.com/donmelton/MPlayerShell/archive/0.9.2.tar.gz'
  sha1 '613d29e66e27e748c29b20df54888a8915e39490'

  head 'https://github.com/donmelton/MPlayerShell.git'

  depends_on MPlayerPresented
  depends_on :macos => :lion
  depends_on :xcode

  def install
    system "xcodebuild", "-project", "MPlayerShell.xcodeproj",
                         "-target", "mps",
                         "-configuration", "Release",
                         "clean", "build",
                         "SYMROOT=build",
                         "DSTROOT=build"
    bin.install "build/Release/mps"
    man1.install "Source/mps.1"
  end

  test do
    system "#{bin}/mps"
  end
end