blob: 9b1f41587f42ab01211b78d0c1a25a7cc4ceed21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
require 'formula'
class Pow < Formula
homepage 'http://pow.cx/'
url 'http://get.pow.cx/versions/0.4.0.tar.gz'
sha1 '85a71532934af680c4a96eadc4e8246d54655c14'
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
|