require 'formula' class Sickbeard < Formula homepage 'http://www.sickbeard.com/' url 'https://github.com/midgetspy/Sick-Beard/archive/build-498.tar.gz' sha1 'd4374c2377d4731aea3b142c4bd14fa82c832951' head 'https://github.com/midgetspy/Sick-Beard.git' depends_on 'Cheetah' => :python def install libexec.install Dir['*'] (bin+"sickbeard").write(startup_script) end plist_options :manual => 'sickbeard' def plist; <<-EOS.undent Label #{plist_name} ProgramArguments #{opt_prefix}/bin/sickbeard -q --nolaunch -p 8081 RunAtLoad EOS end def startup_script; <<-EOS.undent #!/bin/bash python "#{libexec}/SickBeard.py"\ "--pidfile=#{var}/run/sickbeard.pid"\ "--datadir=#{etc}/sickbeard"\ "$@" EOS end def caveats "SickBeard defaults to port 8081." end end