homebrew-core/Formula/pow.rb
Joshua Peek 46b7b0f200 Pow 0.4.1
Is compatible with Node 0.10.x.

Closes Homebrew/homebrew#19872.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-16 14:49:32 -05:00

32 lines
818 B
Ruby

require 'formula'
class Pow < Formula
homepage 'http://pow.cx/'
url 'http://get.pow.cx/versions/0.4.1.tar.gz'
sha1 '46976c6eea914ec78ba424b919e8928e4fc9a6bf'
depends_on 'node'
def install
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
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
Enables both launchd agents:
sudo launchctl load -w /Library/LaunchDaemons/cx.pow.firewall.plist
launchctl load -w ~/Library/LaunchAgents/cx.pow.powd.plist
EOS
end
end