summaryrefslogtreecommitdiff
path: root/homebrew/lighttpd/.make.sh-auto
diff options
context:
space:
mode:
authorMCApollo <34170230+MCApollo@users.noreply.github.com>2019-04-20 20:49:46 -0500
committerMCApollo <34170230+MCApollo@users.noreply.github.com>2019-04-23 20:18:47 -0500
commit12335518ab39608d58370c85ff9f5384ad2aa5f7 (patch)
tree352d81f2a2de3f1252af732080ec0fde38c13b4d /homebrew/lighttpd/.make.sh-auto
parenta2b26ad12d4fa12f0273645caf4be6d0b8b71e7c (diff)
Ported in the homebrew-marauder for a hacky update/import system.
TODO: Maybe add a license & fix up messy code.
Diffstat (limited to 'homebrew/lighttpd/.make.sh-auto')
-rw-r--r--homebrew/lighttpd/.make.sh-auto22
1 files changed, 22 insertions, 0 deletions
diff --git a/homebrew/lighttpd/.make.sh-auto b/homebrew/lighttpd/.make.sh-auto
new file mode 100644
index 000000000..dc94dccee
--- /dev/null
+++ b/homebrew/lighttpd/.make.sh-auto
@@ -0,0 +1,22 @@
+pkg:setup
+args = %W[--disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --sbindir=#{bin} --with-openssl --with-ldap --with-zlib --with-bzip2 ]
+./autogen.sh
+pkg:configure *args
+make DESTDIR=${PKG_DEST} install
+unless File.exist? config_path
+config_path.install "doc/config/lighttpd.conf", "doc/config/modules.conf"
+(config_path/"conf.d/").install Dir["doc/config/conf.d/*.conf"]
+inreplace config_path+"lighttpd.conf" do |s|
+s.sub!(/^var\.log_root\s*=\s*".+"$/, "var.log_root = \"#{log_path}\"")
+s.sub!(/^var\.server_root\s*=\s*".+"$/, "var.server_root = \"#{www_path}\"")
+s.sub!(/^var\.state_dir\s*=\s*".+"$/, "var.state_dir = \"#{run_path}\"")
+s.sub!(/^var\.home_dir\s*=\s*".+"$/, "var.home_dir = \"#{run_path}\"")
+s.sub!(/^var\.conf_dir\s*=\s*".+"$/, "var.conf_dir = \"#{config_path}\"")
+s.sub!(/^server\.port\s*=\s*80$/, "server.port = 8080")
+s.sub!(%r{^server\.document-root\s*=\s*server_root \+ "\/htdocs"$}, "server.document-root = server_root")
+s.sub!(/^server.use-ipv6\s*=\s*"enable"$/, 'server.use-ipv6 = "disable"')
+s.sub!(/^server\.username\s*=\s*".+"$/, 'server.username = "_www"')
+s.sub!(/^server\.groupname\s*=\s*".+"$/, 'server.groupname = "_www"')
+s.sub!(/^server\.event-handler\s*=\s*"linux-sysepoll"$/, 'server.event-handler = "select"')
+s.sub!(/^server\.network-backend\s*=\s*"sendfile"$/, 'server.network-backend = "writev"')
+s.sub!(/^server\.max-connections = .+$/, "server.max-connections = " + (MAX_FDS / 2).to_s)