forked from keitheis/homebrew-dupes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
httpd.rb
62 lines (57 loc) · 1.93 KB
/
httpd.rb
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require 'formula'
class Httpd < Formula
homepage 'http://httpd.apache.org/'
url 'http://www.apache.org/dist/httpd/httpd-2.2.27.tar.bz2'
sha1 'fd4bf18dd1b3e0d9be9e85ff7e033b2eb8aa4976'
skip_clean :la
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}",
"--localstatedir=#{var}/apache2",
"--sysconfdir=#{etc}/apache2",
"--enable-layout=GNU",
"--enable-mods-shared=all",
"--with-ssl=/usr",
"--with-mpm=prefork",
"--disable-unique-id",
"--enable-ssl",
"--enable-dav",
"--enable-cache",
"--enable-proxy",
"--enable-logio",
"--enable-deflate",
"--with-included-apr",
"--enable-cgi",
"--enable-cgid",
"--enable-suexec",
"--enable-rewrite"
system "make"
system "make install"
(var/'apache2/log').mkpath
(var/'apache2/run').mkpath
end
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_prefix}/sbin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
test do
system sbin/"httpd", "-v"
end
end