2011-08-05 19:02:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Pow < Formula
|
|
|
|
homepage 'http://pow.cx/'
|
2012-06-08 01:06:30 +00:00
|
|
|
url 'http://get.pow.cx/versions/0.4.0.tar.gz'
|
|
|
|
sha1 '85a71532934af680c4a96eadc4e8246d54655c14'
|
2011-08-05 19:02:24 +00:00
|
|
|
|
|
|
|
depends_on 'node'
|
|
|
|
|
|
|
|
def install
|
2012-06-08 01:06:30 +00:00
|
|
|
libexec.install Dir['*']
|
|
|
|
(bin/'pow').write <<-EOS.undent
|
|
|
|
#!/bin/sh
|
|
|
|
export POW_BIN="#{HOMEBREW_PREFIX}/bin/pow"
|
|
|
|
exec "#{HOMEBREW_PREFIX}/bin/node" "#{libexec}/lib/command.js" "$@"
|
|
|
|
EOS
|
2011-08-05 19:02:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats;
|
|
|
|
<<-EOS.undent
|
|
|
|
Sets up firewall rules to forward port 80 to Pow:
|
|
|
|
sudo pow --install-system
|
|
|
|
|
|
|
|
Installs launchd agent to start on login:
|
|
|
|
pow --install-local
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|