headphones: vendor dependencies

master
Adam Vandenberg 2014-05-17 11:55:47 -07:00
parent e01feee13c
commit 3445f32579
1 changed files with 27 additions and 8 deletions

View File

@ -1,25 +1,44 @@
require 'formula'
require "formula"
class Headphones < Formula
homepage 'https://github.com/rembo10/headphones'
head 'https://github.com/rembo10/headphones.git'
url 'https://github.com/rembo10/headphones/archive/v0.3.2.tar.gz'
sha1 '61653a41af9d4aed61d1cd0efb9e4a56ae32451a'
homepage "https://github.com/rembo10/headphones"
head "https://github.com/rembo10/headphones.git"
url "https://github.com/rembo10/headphones/archive/v0.3.2.tar.gz"
sha1 "61653a41af9d4aed61d1cd0efb9e4a56ae32451a"
depends_on 'Cheetah' => :python
resource "Markdown" do
url "https://pypi.python.org/packages/source/M/Markdown/Markdown-2.4.tar.gz"
sha1 "7a4a96cd79c4e36918484c634055c4cc27bdf7d4"
end
resource "Cheetah" do
url "https://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz"
sha1 "c218f5d8bc97b39497680f6be9b7bd093f696e89"
end
def startup_script; <<-EOS.undent
#!/bin/bash
export PYTHONPATH="#{libexec}/lib/python2.7/site-packages:$PYTHONPATH"
python "#{libexec}/Headphones.py" --datadir="#{etc}/headphones" "$@"
EOS
end
def install
libexec.install Dir['*']
# 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+"headphones").write(startup_script)
end
plist_options :manual => 'headphones'
plist_options :manual => "headphones"
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>