--- /dev/null
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lighttpd
+PKG_VERSION:=1.4.11
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.lighttpd.net/download/
+PKG_MD5SUM:=f55eebb9815c94a7de35906bb557ecd3
+PKG_CAT:=zcat
+
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lighttpd
+ MENU:=1
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libopenssl +libpcre +libpthread
+ TITLE:=A flexible and lightweight web server
+ URL:=http://www.lighttpd.net/
+endef
+
+define Package/lighttpd/conffiles
+/etc/lighttpd.conf
+/etc/default/lighttpd
+/etc/init.d/lighttpd
+endef
+
+define Package/lighttpd-mod-accesslog
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Access logging module
+endef
+
+define Package/lighttpd-mod-alias
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Directory alias module
+endef
+
+define Package/lighttpd-mod-auth
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Authentication module
+endef
+
+define Package/lighttpd-mod-cgi
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=CGI module
+endef
+
+define Package/lighttpd-mod-evasive
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Evasive module
+endef
+
+define Package/lighttpd-mod-expire
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Expire module
+endef
+
+define Package/lighttpd-mod-fastcgi
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=FastCGI module
+endef
+
+define Package/lighttpd-mod-proxy
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Proxy module
+endef
+
+define Package/lighttpd-mod-redirect
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=URL redirection module
+endef
+
+define Package/lighttpd-mod-rewrite
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=URL rewriting module
+endef
+
+define Package/lighttpd-mod-setenv
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Environment variable setting module
+endef
+
+define Package/lighttpd-mod-simple-vhost
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Simple virtual hosting module
+endef
+
+define Package/lighttpd-mod-ssi
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=SSI module
+endef
+
+define Package/lighttpd-mod-status
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=Server status display module
+endef
+
+define Package/lighttpd-mod-usertrack
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=User tracking module
+endef
+
+define Package/lighttpd-mod-webdav
+ $(call Package/lighttpd)
+ DEPENDS:=lighttpd
+ TITLE:=WebDAV module
+endef
+
+define Build/Configure
+ (cd $(PKG_BUILD_DIR); rm -f config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
+ LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+ PCRE_LIB="-lpcre" \
+ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --program-prefix="" \
+ --program-suffix="" \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --datadir=/usr/share \
+ --includedir=/usr/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib/lighttpd \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc/lighttpd \
+ $(DISABLE_LARGEFILE) \
+ $(DISABLE_NLS) \
+ --enable-shared \
+ --enable-static \
+ --disable-rpath \
+ --without-attr \
+ --without-bzip2 \
+ --without-fam \
+ --without-gdbm \
+ --without-ldap \
+ --without-lua \
+ --without-memcache \
+ --without-mysql \
+ --with-openssl="$(STAGING_DIR)/usr" \
+ --with-pcre \
+ --without-valgrind \
+ --with-webdav-props \
+ );
+endef
+
+define Build/Compile
+ rm -rf $(PKG_INSTALL_DIR)
+ mkdir -p $(PKG_INSTALL_DIR)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+endef
+
+define Package/lighttpd/install
+ install -m0755 -d $(1)/etc
+ install -m0644 ./files/lighttpd.conf $(1)/etc/
+ install -m0755 -d $(1)/etc/default
+ install -m0644 ./files/lighttpd.default $(1)/etc/default/lighttpd
+ install -m0755 -d $(1)/etc/init.d
+ install -m0755 ./files/lighttpd.init $(1)/etc/init.d/lighttpd
+ install -m0755 -d $(1)/usr/lib/lighttpd
+ for m in dirlisting indexfile staticfile; do \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$${m}.so $(1)/usr/lib/lighttpd/ ; \
+ done
+ install -m0755 -d $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(1)/usr/sbin/
+endef
+
+define BuildPlugin
+ define Package/$(1)/install
+ [ -z "$(2)" ] || install -d -m0755 $$(1)/usr/lib/lighttpd
+ for m in $(2); do \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$$$$$${m}.so $$(1)/usr/lib/lighttpd/ ; \
+ done
+ endef
+
+ $$(eval $$(call BuildPackage,$(1)))
+endef
+
+$(eval $(call BuildPackage,lighttpd))
+$(eval $(call BuildPlugin,lighttpd-mod-accesslog,accesslog))
+$(eval $(call BuildPlugin,lighttpd-mod-alias,alias))
+$(eval $(call BuildPlugin,lighttpd-mod-auth,auth))
+$(eval $(call BuildPlugin,lighttpd-mod-cgi,cgi))
+$(eval $(call BuildPlugin,lighttpd-mod-evasive,evasive))
+$(eval $(call BuildPlugin,lighttpd-mod-expire, expire))
+$(eval $(call BuildPlugin,lighttpd-mod-fastcgi,fastcgi))
+$(eval $(call BuildPlugin,lighttpd-mod-proxy,proxy))
+$(eval $(call BuildPlugin,lighttpd-mod-redirect,redirect))
+$(eval $(call BuildPlugin,lighttpd-mod-rewrite,rewrite))
+$(eval $(call BuildPlugin,lighttpd-mod-setenv,setenv))
+$(eval $(call BuildPlugin,lighttpd-mod-simple-vhost,simple_vhost))
+$(eval $(call BuildPlugin,lighttpd-mod-ssi,ssi))
+$(eval $(call BuildPlugin,lighttpd-mod-status,status))
+$(eval $(call BuildPlugin,lighttpd-mod-usertrack,usertrack))
+$(eval $(call BuildPlugin,lighttpd-mod-webdav,webdav))
--- /dev/null
+# lighttpd configuration file
+#
+## modules to load
+# all other module should only be loaded if really neccesary
+# - saves some time
+# - saves memory
+#server.modules = (
+# "mod_rewrite",
+# "mod_redirect",
+# "mod_alias",
+# "mod_auth",
+# "mod_status",
+# "mod_setenv",
+# "mod_fastcgi",
+# "mod_proxy",
+# "mod_simple_vhost",
+# "mod_cgi",
+# "mod_ssi",
+# "mod_usertrack",
+# "mod_expire"
+#)
+
+## a static document-root, for virtual-hosting take look at the
+## server.virtual-* options
+server.document-root = "/www/"
+
+## where to send error-messages to
+#server.errorlog = "/var/log/lighttpd/error.log"
+
+## files to check for if .../ is requested
+index-file.names = ( "index.html", "default.html", "index.htm", "default.htm" )
+
+## mimetype mapping
+mimetype.assign = (
+ ".pdf" => "application/pdf",
+ ".class" => "application/octet-stream",
+ ".pac" => "application/x-ns-proxy-autoconfig",
+ ".swf" => "application/x-shockwave-flash",
+ ".wav" => "audio/x-wav",
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".js" => "text/javascript",
+ ".txt" => "text/plain",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml"
+ )
+
+## Use the "Content-Type" extended attribute to obtain mime type if possible
+#mimetypes.use-xattr = "enable"
+
+## send a different Server: header
+## be nice and keep it at lighttpd
+#server.tag = "lighttpd"
+
+$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 #######
+
+## bind to port (default: 80)
+#server.port = 81
+
+## bind to localhost (default: all interfaces)
+#server.bind = "localhost"
+
+## error-handler for status 404
+#server.error-handler-404 = "/error-handler.html"
+#server.error-handler-404 = "/error-handler.php"
+
+## to help the rc.scripts
+server.pid-file = "/var/run/lighttpd.pid"
+
+
+###### virtual hosts
+##
+## If you want name-based virtual hosting add the next three settings and load
+## mod_simple_vhost
+##
+## document-root =
+## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
+## virtual-server-root + http-host + virtual-server-docroot
+##
+#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
+#simple-vhost.default-host = "grisu.home.kneschke.de"
+#simple-vhost.document-root = "/pages/"
+
+
+##
+## Format: <errorfile-prefix><status>.html
+## -> ..../status-404.html for 'File not found'
+#server.errorfile-prefix = "/www/error-"
+
+## virtual directory listings
+#server.dir-listing = "enable"
+
+## send unhandled HTTP-header headers to error-log
+#debug.dump-unknown-headers = "enable"
+
+### only root can use these options
+#
+# chroot() to directory (default: no chroot() )
+#server.chroot = "/"
+
+## change uid to <uid> (default: don't care)
+#server.username = "nobody"
+
+## change uid to <uid> (default: don't care)
+#server.groupname = "nobody"
+
+#### compress module
+#compress.cache-dir = "/dev/null/"
+#compress.filetype = ("text/plain", "text/html")
+
+#### proxy module
+## read proxy.txt for more info
+#proxy.server = (
+# ".php" => (
+# "localhost" => (
+# "host" => "192.168.0.101",
+# "port" => 80
+# )
+# )
+#)
+
+#### fastcgi module
+## read fastcgi.txt for more info
+#fastcgi.server = (
+# ".php" => (
+# "localhost" => (
+# "socket" => "/tmp/php-fastcgi.socket",
+# "bin-path" => "/usr/local/bin/php"
+# )
+# )
+#)
+
+#### CGI module
+#cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
+
+#### SSL engine
+#ssl.engine = "enable"
+#ssl.pemfile = "server.pem"
+
+#### status module
+#status.status-url = "/server-status"
+#status.config-url = "/server-config"
+
+#### auth module
+## read authentification.txt for more info
+#auth.backend = "plain"
+#auth.backend.plain.userfile = "lighttpd.user"
+#auth.backend.plain.groupfile = "lighttpd.group"
+#auth.require = (
+# "/server-status" => (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "group=www|user=jan|host=192.168.2.10"
+# ),
+# "/server-info" => (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "group=www|user=jan|host=192.168.2.10"
+# )
+#)
+
+#### 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" )
+#}
+
+#### expire module
+#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+
+#### ssi
+#ssi.extension = ( ".shtml" )
+
+#### setenv
+#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
+#setenv.add-response-header = ( "X-Secret-Message" => "42" )
+
+#### 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
--- /dev/null
+OPTIONS="-f /etc/lighttpd.conf"
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+
+BIN=lighttpd
+DEFAULT=/etc/default/$BIN
+LOG_D=/var/log/$BIN
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN.pid
+[ -f $DEFAULT ] && . $DEFAULT
+
+case $1 in
+ start)
+ mkdir -p $LOG_D
+ mkdir -p $RUN_D
+ $BIN $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill $(cat $PID_F)
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?
--- /dev/null
+diff -ruN lighttpd-1.4.2-old/configure lighttpd-1.4.2-new/configure
+--- lighttpd-1.4.2-old/configure 2005-08-29 14:18:11.000000000 +0200
++++ lighttpd-1.4.2-new/configure 2005-09-01 09:06:29.000000000 +0200
+@@ -23849,7 +23849,7 @@
+ echo "$as_me:$LINENO: result: $WITH_PCRE" >&5
+ echo "${ECHO_T}$WITH_PCRE" >&6
+
+-if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then
++if test "$WITH_PCRE" != "no"; then
+ # Extract the first word of "pcre-config", so it can be a program name with args.
+ set dummy pcre-config; ac_word=$2
+ echo "$as_me:$LINENO: checking for $ac_word" >&5
+diff -ruN lighttpd-1.4.2-old/configure.in lighttpd-1.4.2-new/configure.in
+--- lighttpd-1.4.2-old/configure.in 2005-08-29 14:06:03.000000000 +0200
++++ lighttpd-1.4.2-new/configure.in 2005-09-01 09:05:39.000000000 +0200
+@@ -222,7 +222,7 @@
+ [WITH_PCRE=$withval],[WITH_PCRE=yes])
+ AC_MSG_RESULT([$WITH_PCRE])
+
+-if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then
++if test "$WITH_PCRE" != "no"; then
+ AC_PATH_PROG(PCRECONFIG, pcre-config)
+
+ if test x"$PCRECONFIG" != x; then