c9c753d73c
Closes Homebrew/homebrew#31723. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
77 lines
2.2 KiB
Ruby
77 lines
2.2 KiB
Ruby
require "formula"
|
|
|
|
class Sickbeard < Formula
|
|
homepage "http://www.sickbeard.com/"
|
|
head "https://github.com/midgetspy/Sick-Beard.git"
|
|
url "https://github.com/midgetspy/Sick-Beard/archive/build-506.tar.gz"
|
|
sha1 "01ca51feb871f07b3fa1b92ad31d4aa4d72c68f9"
|
|
|
|
bottle do
|
|
sha1 "b372ee9e7ad22a897f215e08155fd0ca0bdd7772" => :mavericks
|
|
sha1 "dbcd049e266ac2415f40b2a09cec9aeb5bb2fbff" => :mountain_lion
|
|
sha1 "a11e0e64068c4785249102e53caf601b59c8bec4" => :lion
|
|
end
|
|
|
|
resource "Markdown" do
|
|
url "https://pypi.python.org/packages/source/M/Markdown/Markdown-2.4.1.tar.gz"
|
|
sha1 "2c9cedad000e9ecdf0b220bd1ad46bc4592d067e"
|
|
end
|
|
|
|
resource "Cheetah" do
|
|
url "https://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz"
|
|
sha1 "c218f5d8bc97b39497680f6be9b7bd093f696e89"
|
|
end
|
|
|
|
def install
|
|
# TODO - strip down to the minimal install
|
|
prefix.install_metafiles
|
|
libexec.install Dir["*"]
|
|
|
|
ENV["CHEETAH_INSTALL_WITHOUT_SETUPTOOLS"] = "1"
|
|
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
|
|
install_args = [ "setup.py", "install", "--prefix=#{libexec}" ]
|
|
|
|
resource("Markdown").stage { system "python", *install_args }
|
|
resource("Cheetah").stage { system "python", *install_args }
|
|
|
|
(bin+"sickbeard").write(startup_script)
|
|
end
|
|
|
|
plist_options :manual => "sickbeard"
|
|
|
|
def plist; <<-EOS.undent
|
|
<?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>
|
|
<string>#{plist_name}</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/sickbeard</string>
|
|
<string>-q</string>
|
|
<string>--nolaunch</string>
|
|
<string>-p</string>
|
|
<string>8081</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
def startup_script; <<-EOS.undent
|
|
#!/bin/bash
|
|
export PYTHONPATH="#{libexec}/lib/python2.7/site-packages:$PYTHONPATH"
|
|
python "#{libexec}/SickBeard.py"\
|
|
"--pidfile=#{var}/run/sickbeard.pid"\
|
|
"--datadir=#{etc}/sickbeard"\
|
|
"$@"
|
|
EOS
|
|
end
|
|
|
|
def caveats
|
|
"SickBeard defaults to port 8081."
|
|
end
|
|
end
|