homebrew-core/Formula/pow.rb
Tom Ward 1ae5c0e20f pow 0.4.3
Closes Homebrew/homebrew#28121.

Signed-off-by: Brett Koonce <koonce@gmail.com>
2014-04-03 17:24:58 -05:00

34 lines
923 B
Ruby

require 'formula'
class Pow < Formula
homepage 'http://pow.cx/'
url 'http://get.pow.cx/versions/0.4.3.tar.gz'
sha1 '7e1faf3c33588bc3e73fb3583265e050a48718b0'
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
Create the required host directories:
mkdir -p ~/Library/Application\\ Support/Pow/Hosts
ln -s ~/Library/Application\\ Support/Pow/Hosts ~/.pow
Setup port 80 forwarding and launchd agents:
sudo pow --install-system
pow --install-local
Load launchd agents:
sudo launchctl load -w /Library/LaunchDaemons/cx.pow.firewall.plist
launchctl load -w ~/Library/LaunchAgents/cx.pow.powd.plist
EOS
end
end