2011-06-20 03:49:06 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Sickbeard < Formula
|
|
|
|
homepage 'http://www.sickbeard.com/'
|
2013-03-29 20:29:20 +00:00
|
|
|
url 'https://github.com/midgetspy/Sick-Beard/archive/build-498.tar.gz'
|
|
|
|
sha1 'd4374c2377d4731aea3b142c4bd14fa82c832951'
|
2011-06-20 03:49:06 +00:00
|
|
|
|
2011-10-10 20:17:11 +00:00
|
|
|
head 'https://github.com/midgetspy/Sick-Beard.git'
|
2011-06-20 03:49:06 +00:00
|
|
|
|
|
|
|
depends_on 'Cheetah' => :python
|
|
|
|
|
|
|
|
def install
|
2013-05-28 02:14:19 +00:00
|
|
|
libexec.install Dir['*']
|
2011-06-20 03:49:06 +00:00
|
|
|
(bin+"sickbeard").write(startup_script)
|
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => 'sickbeard'
|
|
|
|
|
|
|
|
def plist; <<-EOS.undent
|
2011-06-20 03:49:06 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>Label</key>
|
2011-12-31 05:56:52 +00:00
|
|
|
<string>#{plist_name}</string>
|
2011-06-20 03:49:06 +00:00
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
2013-05-28 02:14:19 +00:00
|
|
|
<string>#{opt_prefix}/bin/sickbeard</string>
|
|
|
|
<string>-q</string>
|
|
|
|
<string>--nolaunch</string>
|
|
|
|
<string>-p</string>
|
|
|
|
<string>8081</string>
|
2011-06-20 03:49:06 +00:00
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def startup_script; <<-EOS.undent
|
2013-05-28 02:14:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
python "#{libexec}/SickBeard.py"\
|
2013-06-20 21:59:34 +00:00
|
|
|
"--pidfile=#{var}/run/sickbeard.pid"\
|
|
|
|
"--datadir=#{etc}/sickbeard"\
|
2013-05-28 02:14:19 +00:00
|
|
|
"$@"
|
2011-06-20 03:49:06 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2013-05-28 02:14:19 +00:00
|
|
|
def caveats
|
|
|
|
"SickBeard defaults to port 8081."
|
2011-06-20 03:49:06 +00:00
|
|
|
end
|
|
|
|
end
|