homebrew-core/Formula/playdar.rb
Max Howell c665eac117 Dependency resolution with fancy syntax
Is it a DSL? No. But people call it that apparently.

To add a dependency:

class Doe <Formula
  depends_on 'ray'
  depends_on 'mee' => :optional
  depends_on 'far' => :recommended
  depends_on Sew.new
end

Sew would be a formula you have defined in this Formula file. This is useful,
eg. see Python's formula. Formula specified in this fashion cannot be linked
into the HOMEBREW_PREFIX, they are considered private libraries. This allows
you to create custom installations that are very specific to your formula.

More features to come, like specifying versions
2009-09-21 18:27:48 +01:00

34 lines
752 B
Ruby

require 'brewkit'
class Playdar <Formula
@homepage='http://www.playdar.org'
@head='git://github.com/mxcl/playdar.git'
depends_on 'taglib'
depends_on 'boost'
depends_on 'cmake'
def skip_clean? path
# for some reason stripping breaks it
path == bin+'playdar'
end
def install
# RJ does this with all his projects :P
inreplace 'CMakeLists.txt', 'SET(CMAKE_INSTALL_PREFIX "/usr/local")', ''
system "cmake . #{std_cmake_parameters}"
system "make install"
prefix.install 'www'
prefix.install 'plugins'
(prefix+'plugins'+'.gitignore').unlink
end
def caveats
<<-EOS
You have to execute playdar with its prefix as working directory, eg:
$ cd #{prefix} && bin/playdar
EOS
end
end