2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-08-23 18:05:05 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Playdar < Formula
|
2009-11-04 16:34:41 +00:00
|
|
|
homepage 'http://www.playdar.org'
|
2011-05-27 05:02:55 +00:00
|
|
|
head 'https://github.com/RJ/playdar-core.git'
|
2009-08-23 18:05:05 +00:00
|
|
|
|
2009-09-18 18:16:39 +00:00
|
|
|
depends_on 'taglib'
|
2009-11-04 16:34:41 +00:00
|
|
|
depends_on 'erlang'
|
2009-08-23 18:05:05 +00:00
|
|
|
|
|
|
|
def install
|
2009-11-04 16:34:41 +00:00
|
|
|
system "make all"
|
|
|
|
system "make scanner"
|
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
Dir['playdar_modules/*/src'].each{ |fn| rm_rf fn }
|
|
|
|
rm_rf 'playdar_modules/library/priv/taglib_driver/scanner_visual_studio_sln'
|
2009-11-04 16:34:41 +00:00
|
|
|
File.unlink 'playdar_modules/library/priv/taglib_driver/taglib_json_reader.cpp'
|
2009-08-23 18:05:05 +00:00
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
# otherwise playdar crashes
|
|
|
|
prefix.install ['ebin', 'playdar_modules', 'priv', 'etc']
|
|
|
|
|
2009-11-04 16:34:41 +00:00
|
|
|
inreplace 'playdarctl', 'cd `dirname $0`', "cd #{prefix}"
|
|
|
|
inreplace 'playdarctl', 'EBIN=./ebin/', "EBIN=#{prefix}/ebin"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2009-11-04 16:34:41 +00:00
|
|
|
bin.install 'playdarctl'
|
2009-08-23 18:05:05 +00:00
|
|
|
end
|
|
|
|
end
|