2011-08-05 19:02:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Pow < Formula
|
|
|
|
homepage 'http://pow.cx/'
|
2013-05-16 19:19:44 +00:00
|
|
|
url 'http://get.pow.cx/versions/0.4.1.tar.gz'
|
|
|
|
sha1 '46976c6eea914ec78ba424b919e8928e4fc9a6bf'
|
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
|
2013-09-30 11:02:31 +00:00
|
|
|
Create the required host directories:
|
2013-10-19 13:15:59 +00:00
|
|
|
mkdir -p ~/Library/Application\\ Support/Pow/Hosts
|
|
|
|
ln -s ~/Library/Application\\ Support/Pow/Hosts ~/.pow
|
2011-08-05 19:02:24 +00:00
|
|
|
|
2013-09-30 11:02:31 +00:00
|
|
|
Setup port 80 forwarding and launchd agents:
|
|
|
|
sudo pow --install-system
|
2011-08-05 19:02:24 +00:00
|
|
|
pow --install-local
|
2012-06-08 20:34:10 +00:00
|
|
|
|
2013-09-30 11:02:31 +00:00
|
|
|
Load launchd agents:
|
2012-06-08 20:34:10 +00:00
|
|
|
sudo launchctl load -w /Library/LaunchDaemons/cx.pow.firewall.plist
|
|
|
|
launchctl load -w ~/Library/LaunchAgents/cx.pow.powd.plist
|
2011-08-05 19:02:24 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|