aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2006-01-21 18:11:54 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2006-01-21 18:11:54 +0000
commit46e306b181e3c40760829324bf1e9159705574f9 (patch)
treeae4c99d5d5b3f168c06798acfbcc2d1c673f14d4
parentd105ac64b38b06a6f275e7a1abdac9dc0853f57e (diff)
downloadports-46e306b181e3c40760829324bf1e9159705574f9.tar.gz
ports-46e306b181e3c40760829324bf1e9159705574f9.zip
Notes
-rw-r--r--www/lighttpd/Makefile26
-rw-r--r--www/lighttpd/distinfo6
-rw-r--r--www/lighttpd/files/lighttpd.conf.sample75
-rw-r--r--www/lighttpd/files/lighttpd.sh.in30
-rw-r--r--www/lighttpd/pkg-plist1
5 files changed, 95 insertions, 43 deletions
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile
index 1dadc58b4126..0e43ba9e2101 100644
--- a/www/lighttpd/Makefile
+++ b/www/lighttpd/Makefile
@@ -6,12 +6,9 @@
#
PORTNAME= lighttpd
-PORTVERSION= 1.4.8
-PORTREVISION= 1
+PORTVERSION= 1.4.9
CATEGORIES= www
-MASTER_SITES= http://www.lighttpd.net/download/ \
- http://dl.fkb.wormulon.net/lighttpd/ \
- http://dl.kel.wormulon.net/lighttpd/
+MASTER_SITES= http://www.lighttpd.net/download/
MAINTAINER= hendrik@scholz.net
COMMENT= A secure, fast, compliant, and very flexible Web Server
@@ -19,11 +16,11 @@ COMMENT= A secure, fast, compliant, and very flexible Web Server
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre
USE_AUTOTOOLS= autoconf:259 libtool:15
-USE_REINPLACE= yes
-USE_RC_SUBR= lighttpd.sh
-USE_GNOME= lthack
+GNU_CONFIGURE= yes
+USE_GNOME= lthack
+USE_RC_SUBR= lighttpd.sh
+CONFIGURE_ARGS= --libdir=${PREFIX}/lib/lighttpd
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ARGS= --libdir=${PREFIX}/lib/lighttpd
MAN1= lighttpd.1 spawn-fcgi.1
@@ -35,6 +32,9 @@ OPTIONS= OPENSSL "Enable SSL support" on \
.include <bsd.port.pre.mk>
+# Default REQUIRE to rc.d script
+_REQUIRE= DEAMON
+
.if !defined(WITHOUT_OPENSSL)
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
CONFIGURE_ARGS+= --with-openssl \
@@ -43,13 +43,15 @@ CONFIGURE_ARGS+= --with-openssl \
.endif
.if defined(WITH_OPENLDAP)
-USE_OPENLDAP= yes
+USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-ldap
+_REQUIRE+= slapd
.endif
.if defined(WITH_MYSQL)
-USE_MYSQL= yes
+USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql
+_REQUIRE+= mysql
.endif
.if defined(WITHOUT_IPV6)
@@ -62,6 +64,8 @@ CONFIGURE_ARGS+= --with-lua
CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L/${LOCALBASE}/lib
.endif
+SUB_LIST+= REQUIRE="${_REQUIRE}"
+
post-install:
@${INSTALL_DATA} ${FILESDIR}/lighttpd.conf.sample ${PREFIX}/etc
.if !exists(${PREFIX}/etc/lighttpd.conf)
diff --git a/www/lighttpd/distinfo b/www/lighttpd/distinfo
index 6883c58ad676..4a01017b0b01 100644
--- a/www/lighttpd/distinfo
+++ b/www/lighttpd/distinfo
@@ -1,3 +1,3 @@
-MD5 (lighttpd-1.4.8.tar.gz) = 7d7790ef95ff5755f73bfcda4f13696d
-SHA256 (lighttpd-1.4.8.tar.gz) = f3115cb4b9f9805c9a9e7d6cdc97512adaaebde01a84122fcbd1c0ca16bc2d69
-SIZE (lighttpd-1.4.8.tar.gz) = 769111
+MD5 (lighttpd-1.4.9.tar.gz) = 20a171774a0615069de3704db52483aa
+SHA256 (lighttpd-1.4.9.tar.gz) = 7603b5eb204a84f654c66e5582197e4810df71175a3be11ecfc8675307d043a9
+SIZE (lighttpd-1.4.9.tar.gz) = 775524
diff --git a/www/lighttpd/files/lighttpd.conf.sample b/www/lighttpd/files/lighttpd.conf.sample
index 4a9ad1bde0f8..08eb5ec8760d 100644
--- a/www/lighttpd/files/lighttpd.conf.sample
+++ b/www/lighttpd/files/lighttpd.conf.sample
@@ -1,6 +1,6 @@
# lighttpd configuration file
#
-# use a it as base for lighttpd 1.0.0 and above
+# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
@@ -16,6 +16,8 @@ server.modules = (
# "mod_redirect",
# "mod_alias",
"mod_access",
+# "mod_cml",
+# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
@@ -41,13 +43,12 @@ server.document-root = "/usr/local/www/data/"
server.errorlog = "/var/log/lighttpd.error.log"
# files to check for if .../ is requested
-server.indexfiles = ( "index.php", "index.html",
+index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
-# set the event-handler (read the performance section in the manual)
+## set the event-handler (read the performance section in the manual)
server.event-handler = "freebsd-kqueue" # needed on OS X
-
# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
@@ -68,7 +69,7 @@ mimetype.assign = (
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
- ".ogg" => "audio/x-wav",
+ ".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
@@ -83,6 +84,8 @@ mimetype.assign = (
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
+ ".cpp" => "text/plain",
+ ".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
@@ -102,12 +105,12 @@ mimetype.assign = (
)
# Use the "Content-Type" extended attribute to obtain mime type if possible
-#mimetypes.use-xattr = "enable"
+#mimetype.use-xattr = "enable"
## send a different Server: header
## be nice and keep it at lighttpd
-#server.tag = "lighttpd"
+# server.tag = "lighttpd"
#### accesslog module
accesslog.filename = "/var/log/lighttpd.access.log"
@@ -119,7 +122,15 @@ accesslog.filename = "/var/log/lighttpd.access.log"
# of the document-root
url.access-deny = ( "~", ".inc" )
+$HTTP["url"] =~ "\.pdf$" {
+ server.range-requests = "disable"
+}
+##
+# which extensions should not be handle via static-file transfer
+#
+# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
######### Options that are good to be but not neccesary to be changed #######
@@ -158,7 +169,7 @@ server.pid-file = "/var/run/lighttpd.pid"
#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
## virtual directory listings
-#server.dir-listing = "enable"
+#dir-listing.activate = "enable"
## enable debugging
#debug.log-request-header = "enable"
@@ -217,7 +228,7 @@ server.groupname = "www"
#status.config-url = "/server-config"
#### auth module
-## read authentification.txt for more info
+## read authentication.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"
@@ -230,19 +241,23 @@ server.groupname = "www"
# (
# "method" => "digest",
# "realm" => "download archiv",
-# "require" => "group=www|user=jan|host=192.168.2.10"
+# "require" => "user=jan"
# ),
-# "/server-info" =>
+# "/server-config" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
-# "require" => "group=www|user=jan|host=192.168.2.10"
+# "require" => "valid-user"
# )
# )
#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
+#### both rewrite/redirect support back reference to regex conditional using %n
+#$HTTP["host"] =~ "^www\.(.*)" {
+# url.redirect = ( "^/(.*)" => "http://%1/$1" )
+#}
#
# define a pattern for the host url finding
@@ -268,3 +283,39 @@ server.groupname = "www"
#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )
+
+## for mod_trigger_b4_dl
+# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
+# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
+# trigger-before-download.trigger-url = "^/trigger/"
+# trigger-before-download.download-url = "^/download/"
+# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
+# trigger-before-download.trigger-timeout = 10
+
+## for mod_cml
+## don't forget to add index.cml to server.indexfiles
+# cml.extension = ".cml"
+# cml.memcache-hosts = ( "127.0.0.1:11211" )
+
+#### variable usage:
+## variable name without "." is auto prefixed by "var." and becomes "var.bar"
+#bar = 1
+#var.mystring = "foo"
+
+## integer add
+#bar += 1
+## string concat, with integer cast as string, result: "www.foo1.com"
+#server.name = "www." + mystring + var.bar + ".com"
+## array merge
+#index-file.names = (foo + ".php") + index-file.names
+#index-file.names += (foo + ".php")
+
+#### include
+#include /etc/lighttpd/lighttpd-inc.conf
+## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
+#include "lighttpd-inc.conf"
+
+#### include_shell
+#include_shell "echo var.a=1"
+## the above is same as:
+#var.a=1
diff --git a/www/lighttpd/files/lighttpd.sh.in b/www/lighttpd/files/lighttpd.sh.in
index f42d93cdbeac..66a2e24af834 100644
--- a/www/lighttpd/files/lighttpd.sh.in
+++ b/www/lighttpd/files/lighttpd.sh.in
@@ -2,42 +2,38 @@
#
# $FreeBSD$
#
-
# PROVIDE: lighttpd
-# REQUIRE: DAEMON
+# REQUIRE: %%REQUIRE%%
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
-
#
# Add the following lines to /etc/rc.conf to enable lighttpd:
#
-#lighttpd_enable="YES"
-#
-# See lighttpd(1) for manual
+# lighttpd_enable (bool): Set it to "YES" to enable lighttpd
+# Default is "NO".
+# lighttpd_conf (path): Set full path to config file.
+# Default is "%%PREFIX%%/etc/lighttpd.conf".
#
. %%RC_SUBR%%
-name=lighttpd
+name="lighttpd"
rcvar=`set_rcvar`
+load_rc_config $name
+
+: ${lighttpd_enable="NO"}
+: ${lighttpd_conf="%%PREFIX%%/etc/lighttpd.conf"}
+
command=%%PREFIX%%/sbin/lighttpd
+command_args="-f ${lighttpd_conf}"
pidfile=/var/run/lighttpd.pid
required_files=${lighttpd_conf}
-
stop_postcmd=stop_postcmd
stop_postcmd()
{
- rm -f $pidfile
+ rm -f ${pidfile}
}
-# set defaults
-
-lighttpd_enable=${lighttpd_enable:-"NO"}
-lighttpd_conf=${lighttpd_conf:-"%%PREFIX%%/etc/lighttpd.conf"}
-
-load_rc_config $name
-
-command_args="-f ${lighttpd_conf}"
run_rc_command "$1"
diff --git a/www/lighttpd/pkg-plist b/www/lighttpd/pkg-plist
index 150eecbd0ce8..f79537835821 100644
--- a/www/lighttpd/pkg-plist
+++ b/www/lighttpd/pkg-plist
@@ -11,6 +11,7 @@ lib/lighttpd/mod_cgi.so
lib/lighttpd/mod_cml.so
lib/lighttpd/mod_compress.so
lib/lighttpd/mod_dirlisting.so
+lib/lighttpd/mod_evasive.so
lib/lighttpd/mod_evhost.so
lib/lighttpd/mod_expire.so
lib/lighttpd/mod_fastcgi.so