Browse Source

Copy lighttpd package from old repository

Signed-off-by: W. Michael Petullo <mike@flyn.org>
W. Michael Petullo 10 years ago
parent
commit
1e122071b1
3 changed files with 575 additions and 0 deletions
  1. 328
    0
      net/lighttpd/Makefile
  2. 231
    0
      net/lighttpd/files/lighttpd.conf
  3. 16
    0
      net/lighttpd/files/lighttpd.init

+ 328
- 0
net/lighttpd/Makefile View File

@@ -0,0 +1,328 @@
1
+#
2
+# Copyright (C) 2006-2012 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=lighttpd
11
+PKG_VERSION:=1.4.30
12
+PKG_RELEASE:=2
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15
+PKG_SOURCE_URL:=http://download.lighttpd.net/lighttpd/releases-1.4.x
16
+PKG_MD5SUM:=4630517b8342d4ec0a2d61a0a9e05c82
17
+
18
+PKG_FIXUP:=autoreconf
19
+PKG_INSTALL:=1
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/lighttpd/Default
24
+  SUBMENU:=Web Servers/Proxies
25
+  SECTION:=net
26
+  CATEGORY:=Network
27
+  URL:=http://www.lighttpd.net/
28
+  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
29
+endef
30
+
31
+define Package/lighttpd
32
+  $(call Package/lighttpd/Default)
33
+  MENU:=1
34
+  DEPENDS:=+LIGHTTPD_SSL:libopenssl +libpcre +libpthread
35
+  TITLE:=A flexible and lightweight web server
36
+endef
37
+
38
+define Package/lighttpd/config
39
+config LIGHTTPD_SSL
40
+	bool "SSL support"
41
+	depends on PACKAGE_lighttpd
42
+	default y
43
+	help
44
+	  Implements SSL support in lighttpd (using libopenssl). This
45
+	  option is required if you enable the SSL engine in your
46
+	  lighttpd confguration file.
47
+endef
48
+
49
+define Package/lighttpd-mod-access
50
+  $(call Package/lighttpd/Default)
51
+  DEPENDS:=lighttpd
52
+  TITLE:=Access restrictions module
53
+endef
54
+
55
+define Package/lighttpd-mod-accesslog
56
+  $(call Package/lighttpd/Default)
57
+  DEPENDS:=lighttpd
58
+  TITLE:=Access logging module
59
+endef
60
+
61
+define Package/lighttpd-mod-alias
62
+  $(call Package/lighttpd/Default)
63
+  DEPENDS:=lighttpd
64
+  TITLE:=Directory alias module
65
+endef
66
+
67
+define Package/lighttpd-mod-auth
68
+  $(call Package/lighttpd/Default)
69
+  DEPENDS:=lighttpd
70
+  TITLE:=Authentication module
71
+endef
72
+
73
+define Package/lighttpd-mod-cgi
74
+  $(call Package/lighttpd/Default)
75
+  DEPENDS:=lighttpd
76
+  TITLE:=CGI module
77
+endef
78
+
79
+define Package/lighttpd-mod-cml
80
+  $(call Package/lighttpd/Default)
81
+  DEPENDS:=lighttpd
82
+  TITLE:=Cache Meta Language module
83
+endef
84
+
85
+define Package/lighttpd-mod-compress
86
+  $(call Package/lighttpd/Default)
87
+  DEPENDS:=lighttpd +zlib
88
+  TITLE:=Compress output module
89
+endef
90
+
91
+define Package/lighttpd-mod-evasive
92
+  $(call Package/lighttpd/Default)
93
+  DEPENDS:=lighttpd
94
+  TITLE:=Evasive module
95
+endef
96
+
97
+define Package/lighttpd-mod-evhost
98
+  $(call Package/lighttpd/Default)
99
+  DEPENDS:=lighttpd
100
+  TITLE:=Exnhanced Virtual-Hosting module
101
+endef
102
+
103
+define Package/lighttpd-mod-expire
104
+  $(call Package/lighttpd/Default)
105
+  DEPENDS:=lighttpd
106
+  TITLE:=Expire module
107
+endef
108
+
109
+define Package/lighttpd-mod-extforward
110
+  $(call Package/lighttpd/Default)
111
+  DEPENDS:=lighttpd
112
+  TITLE:=Extract client IP module
113
+endef
114
+
115
+define Package/lighttpd-mod-fastcgi
116
+  $(call Package/lighttpd/Default)
117
+  DEPENDS:=lighttpd
118
+  TITLE:=FastCGI module
119
+endef
120
+
121
+define Package/lighttpd-mod-flv-streaming
122
+  $(call Package/lighttpd/Default)
123
+  DEPENDS:=lighttpd
124
+  TITLE:=flv streaming module
125
+endef
126
+
127
+define Package/lighttpd-mod-magnet
128
+  $(call Package/lighttpd/Default)
129
+  DEPENDS:=lighttpd
130
+  TITLE:=magnet module
131
+endef
132
+
133
+define Package/lighttpd-mod-mysql-vhost
134
+  $(call Package/lighttpd/Default)
135
+  DEPENDS:=lighttpd +libmysqlclient
136
+  TITLE:=Mysql virtual hosting module
137
+endef
138
+
139
+define Package/lighttpd-mod-proxy
140
+  $(call Package/lighttpd/Default)
141
+  DEPENDS:=lighttpd
142
+  TITLE:=Proxy module
143
+endef
144
+
145
+define Package/lighttpd-mod-redirect
146
+  $(call Package/lighttpd/Default)
147
+  DEPENDS:=lighttpd +libpcre
148
+  TITLE:=URL redirection module
149
+endef
150
+
151
+define Package/lighttpd-mod-rewrite
152
+  $(call Package/lighttpd/Default)
153
+  DEPENDS:=lighttpd +libpcre
154
+  TITLE:=URL rewriting module
155
+endef
156
+
157
+define Package/lighttpd-mod-rrdtool
158
+  $(call Package/lighttpd/Default)
159
+  DEPENDS:=lighttpd
160
+  TITLE:=rrdtool module
161
+endef
162
+
163
+define Package/lighttpd-mod-scgi
164
+  $(call Package/lighttpd/Default)
165
+  DEPENDS:=lighttpd
166
+  TITLE:=SCGI module
167
+endef
168
+
169
+define Package/lighttpd-mod-secdownload
170
+  $(call Package/lighttpd/Default)
171
+  DEPENDS:=lighttpd
172
+  TITLE:=Secure and fast download module
173
+endef
174
+
175
+define Package/lighttpd-mod-setenv
176
+  $(call Package/lighttpd/Default)
177
+  DEPENDS:=lighttpd
178
+  TITLE:=Environment variable setting module
179
+endef
180
+
181
+define Package/lighttpd-mod-simple-vhost
182
+  $(call Package/lighttpd/Default)
183
+  DEPENDS:=lighttpd
184
+  TITLE:=Simple virtual hosting module
185
+endef
186
+
187
+define Package/lighttpd-mod-ssi
188
+  $(call Package/lighttpd/Default)
189
+  DEPENDS:=lighttpd +libpcre
190
+  TITLE:=SSI module
191
+endef
192
+
193
+define Package/lighttpd-mod-status
194
+  $(call Package/lighttpd/Default)
195
+  DEPENDS:=lighttpd
196
+  TITLE:=Server status display module
197
+endef
198
+
199
+define Package/lighttpd-mod-trigger-b4-dl
200
+  $(call Package/lighttpd/Default)
201
+  DEPENDS:=lighttpd +libpcre
202
+  TITLE:=Trigger before download module
203
+endef
204
+
205
+define Package/lighttpd-mod-userdir
206
+  $(call Package/lighttpd/Default)
207
+  DEPENDS:=lighttpd
208
+  TITLE:=User directory module
209
+endef
210
+
211
+define Package/lighttpd-mod-usertrack
212
+  $(call Package/lighttpd/Default)
213
+  DEPENDS:=lighttpd
214
+  TITLE:=User tracking module
215
+endef
216
+
217
+define Package/lighttpd-mod-webdav
218
+  $(call Package/lighttpd/Default)
219
+  DEPENDS:=lighttpd +libsqlite3 +libuuid +libxml2
220
+  TITLE:=WebDAV module
221
+endef
222
+
223
+CONFIGURE_ARGS+= \
224
+	--libdir=/usr/lib/lighttpd \
225
+	--sysconfdir=/etc/lighttpd \
226
+	--enable-shared \
227
+	--enable-static \
228
+	--disable-rpath \
229
+	--without-attr \
230
+	--without-bzip2 \
231
+	--without-fam \
232
+	--without-gdbm \
233
+	--without-ldap \
234
+	--without-lua \
235
+	--without-memcache \
236
+	--without-mysql \
237
+	--with-pcre \
238
+	--without-valgrind \
239
+	 $(call autoconf_bool,CONFIG_IPV6,ipv6)
240
+
241
+CONFIGURE_VARS+= \
242
+	PCRE_LIB="-lpcre" \
243
+
244
+ifneq ($(strip $(CONFIG_LIGHTTPD_SSL)),)
245
+  CONFIGURE_ARGS+= \
246
+	--with-openssl="$(STAGING_DIR)/usr"
247
+else
248
+  CONFIGURE_ARGS+= \
249
+	--without-openssl
250
+endif
251
+
252
+ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-webdav),)
253
+  CONFIGURE_ARGS+= \
254
+	--with-webdav-locks \
255
+	--with-webdav-props
256
+  # XXX: needed by sqlite3 to prevent segfaults in mod_webdav.so
257
+  CONFIGURE_VARS+= \
258
+	LIBS="-lpthread"
259
+else
260
+  CONFIGURE_ARGS+= \
261
+	--without-webdav-locks \
262
+	--without-webdav-props
263
+endif
264
+
265
+define Build/Configure
266
+$(call Build/Configure/Default)
267
+	# XXX: override pcre (mis)detection by ./configure when cross-compiling
268
+	echo "#define HAVE_LIBPCRE 1" >>$(PKG_BUILD_DIR)/config.h
269
+	echo "#define HAVE_PCRE_H 1" >>$(PKG_BUILD_DIR)/config.h
270
+endef
271
+
272
+define Package/lighttpd/conffiles
273
+/etc/lighttpd/lighttpd.conf
274
+endef
275
+
276
+define Package/lighttpd/install
277
+	$(INSTALL_DIR) $(1)/etc/lighttpd
278
+	$(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/lighttpd/
279
+	$(INSTALL_DIR) $(1)/etc/init.d
280
+	$(INSTALL_BIN) ./files/lighttpd.init $(1)/etc/init.d/lighttpd
281
+	$(INSTALL_DIR) $(1)/usr/lib/lighttpd
282
+	for m in dirlisting indexfile staticfile; do \
283
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$${m}.so $(1)/usr/lib/lighttpd/ ; \
284
+	done
285
+	$(INSTALL_DIR) $(1)/usr/sbin
286
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(1)/usr/sbin/
287
+endef
288
+
289
+define BuildPlugin
290
+  define Package/$(1)/install
291
+	[ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/lighttpd
292
+	for m in $(2); do \
293
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$$$$$${m}.so $$(1)/usr/lib/lighttpd/ ; \
294
+	done
295
+  endef
296
+
297
+  $$(eval $$(call BuildPackage,$(1)))
298
+endef
299
+
300
+$(eval $(call BuildPackage,lighttpd))
301
+$(eval $(call BuildPlugin,lighttpd-mod-access,access))
302
+$(eval $(call BuildPlugin,lighttpd-mod-accesslog,accesslog))
303
+$(eval $(call BuildPlugin,lighttpd-mod-alias,alias))
304
+$(eval $(call BuildPlugin,lighttpd-mod-auth,auth))
305
+$(eval $(call BuildPlugin,lighttpd-mod-cgi,cgi))
306
+$(eval $(call BuildPlugin,lighttpd-mod-cml,cml))
307
+$(eval $(call BuildPlugin,lighttpd-mod-compress,compress))
308
+$(eval $(call BuildPlugin,lighttpd-mod-evasive,evasive))
309
+$(eval $(call BuildPlugin,lighttpd-mod-evhost,evhost))
310
+$(eval $(call BuildPlugin,lighttpd-mod-expire,expire))
311
+$(eval $(call BuildPlugin,lighttpd-mod-extforward,extforward))
312
+$(eval $(call BuildPlugin,lighttpd-mod-fastcgi,fastcgi))
313
+$(eval $(call BuildPlugin,lighttpd-mod-flv-streaming,flv_streaming))
314
+$(eval $(call BuildPlugin,lighttpd-mod-magnet,magnet))
315
+$(eval $(call BuildPlugin,lighttpd-mod-proxy,proxy))
316
+$(eval $(call BuildPlugin,lighttpd-mod-redirect,redirect))
317
+$(eval $(call BuildPlugin,lighttpd-mod-rewrite,rewrite))
318
+$(eval $(call BuildPlugin,lighttpd-mod-rrdtool,rrdtool))
319
+$(eval $(call BuildPlugin,lighttpd-mod-scgi,scgi))
320
+$(eval $(call BuildPlugin,lighttpd-mod-secdownload,secdownload))
321
+$(eval $(call BuildPlugin,lighttpd-mod-setenv,setenv))
322
+$(eval $(call BuildPlugin,lighttpd-mod-simple-vhost,simple_vhost))
323
+$(eval $(call BuildPlugin,lighttpd-mod-ssi,ssi))
324
+$(eval $(call BuildPlugin,lighttpd-mod-status,status))
325
+$(eval $(call BuildPlugin,lighttpd-mod-trigger-b4-dl,trigger_b4_dl))
326
+$(eval $(call BuildPlugin,lighttpd-mod-userdir,userdir))
327
+$(eval $(call BuildPlugin,lighttpd-mod-usertrack,usertrack))
328
+$(eval $(call BuildPlugin,lighttpd-mod-webdav,webdav))

+ 231
- 0
net/lighttpd/files/lighttpd.conf View File

@@ -0,0 +1,231 @@
1
+# lighttpd configuration file
2
+# 
3
+## modules to load
4
+# all other module should only be loaded if really neccesary
5
+# - saves some time
6
+# - saves memory
7
+#server.modules = ( 
8
+#	"mod_rewrite", 
9
+#	"mod_redirect", 
10
+#	"mod_alias", 
11
+#	"mod_auth", 
12
+#	"mod_status", 
13
+#	"mod_setenv",
14
+#	"mod_fastcgi",
15
+#	"mod_proxy",
16
+#	"mod_simple_vhost",
17
+#	"mod_cgi",
18
+#	"mod_ssi",
19
+#	"mod_usertrack",
20
+#	"mod_expire",
21
+#	"mod_webdav"
22
+#)
23
+
24
+# force use of the "write" backend (closes: #2401)
25
+server.network-backend = "write"
26
+
27
+## a static document-root, for virtual-hosting take look at the 
28
+## server.virtual-* options
29
+server.document-root = "/www/"
30
+
31
+## where to send error-messages to
32
+#server.errorlog = "/var/log/lighttpd/error.log"
33
+
34
+## files to check for if .../ is requested
35
+index-file.names = ( "index.html", "default.html", "index.htm", "default.htm" )
36
+
37
+## mimetype mapping
38
+mimetype.assign = (  
39
+	".pdf"   => "application/pdf",
40
+	".class" => "application/octet-stream",
41
+	".pac"   => "application/x-ns-proxy-autoconfig",
42
+	".swf"   => "application/x-shockwave-flash",
43
+	".wav"   => "audio/x-wav",
44
+	".gif"   => "image/gif",
45
+	".jpg"   => "image/jpeg",
46
+	".jpeg"  => "image/jpeg",
47
+	".png"   => "image/png",
48
+	".svg"   => "image/svg+xml",
49
+	".css"   => "text/css",
50
+	".html"  => "text/html",
51
+	".htm"   => "text/html",
52
+	".js"    => "text/javascript",
53
+	".txt"   => "text/plain",
54
+	".dtd"   => "text/xml",
55
+	".xml"   => "text/xml"
56
+ )
57
+
58
+## Use the "Content-Type" extended attribute to obtain mime type if possible
59
+#mimetypes.use-xattr = "enable"
60
+
61
+## send a different Server: header
62
+## be nice and keep it at lighttpd
63
+#server.tag = "lighttpd"
64
+
65
+$HTTP["url"] =~ "\.pdf$" {
66
+	server.range-requests = "disable"
67
+}
68
+
69
+##
70
+# which extensions should not be handle via static-file transfer
71
+#
72
+# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
73
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
74
+
75
+######### Options that are good to be but not neccesary to be changed #######
76
+
77
+## bind to port (default: 80)
78
+#server.port = 81
79
+
80
+## bind to localhost (default: all interfaces)
81
+#server.bind = "localhost"
82
+
83
+## error-handler for status 404
84
+#server.error-handler-404 = "/error-handler.html"
85
+#server.error-handler-404 = "/error-handler.php"
86
+
87
+## to help the rc.scripts
88
+server.pid-file = "/var/run/lighttpd.pid"
89
+
90
+
91
+###### virtual hosts
92
+##
93
+##   If you want name-based virtual hosting add the next three settings and load
94
+##   mod_simple_vhost
95
+##
96
+## document-root =
97
+##   virtual-server-root + virtual-server-default-host + virtual-server-docroot or
98
+##   virtual-server-root + http-host + virtual-server-docroot
99
+##
100
+#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
101
+#simple-vhost.default-host = "grisu.home.kneschke.de"
102
+#simple-vhost.document-root = "/pages/"
103
+
104
+
105
+## 
106
+## Format: <errorfile-prefix><status>.html
107
+## -> ..../status-404.html for 'File not found'
108
+#server.errorfile-prefix = "/www/error-"
109
+
110
+## virtual directory listings
111
+#server.dir-listing = "enable"
112
+
113
+## send unhandled HTTP-header headers to error-log
114
+#debug.dump-unknown-headers = "enable"
115
+
116
+### only root can use these options
117
+#
118
+# chroot() to directory (default: no chroot() )
119
+#server.chroot = "/"
120
+
121
+## change uid to <uid> (default: don't care)
122
+#server.username = "nobody"
123
+#
124
+server.upload-dirs = ( "/tmp" )
125
+
126
+## change uid to <uid> (default: don't care)
127
+#server.groupname = "nobody"
128
+
129
+#### compress module
130
+#compress.cache-dir          = "/dev/null/"
131
+#compress.filetype           = ("text/plain", "text/html")
132
+
133
+#### proxy module
134
+## read proxy.txt for more info
135
+#proxy.server = (
136
+#	".php" => (
137
+#		"localhost" => (
138
+#			"host" => "192.168.0.101",
139
+#			"port" => 80
140
+#		)
141
+#	)
142
+#)
143
+
144
+#### fastcgi module
145
+## read fastcgi.txt for more info
146
+#fastcgi.server = (
147
+#	".php" => (
148
+#		"localhost" => (
149
+#			"socket" => "/tmp/php-fastcgi.socket",
150
+#			"bin-path" => "/usr/local/bin/php"
151
+#		)
152
+#	)
153
+#)
154
+
155
+#### CGI module
156
+#cgi.assign = ( ".pl"  => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
157
+
158
+#### SSL engine
159
+#ssl.engine = "enable"
160
+#ssl.pemfile = "server.pem"
161
+
162
+#### status module
163
+#status.status-url = "/server-status"
164
+#status.config-url = "/server-config"
165
+
166
+#### auth module
167
+## read authentification.txt for more info
168
+#auth.backend = "plain"
169
+#auth.backend.plain.userfile = "lighttpd.user"
170
+#auth.backend.plain.groupfile = "lighttpd.group"
171
+#auth.require = (
172
+#	"/server-status" => ( 
173
+#		"method"  => "digest",
174
+#		"realm"   => "download archiv",
175
+#		"require" => "group=www|user=jan|host=192.168.2.10"
176
+#	),
177
+#	"/server-info" => ( 
178
+#		"method"  => "digest",
179
+#		"realm"   => "download archiv",
180
+#		"require" => "group=www|user=jan|host=192.168.2.10"
181
+#	)
182
+#)
183
+
184
+#### url handling modules (rewrite, redirect, access)
185
+#url.rewrite = ( "^/$" => "/server-status" )
186
+#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
187
+
188
+#### both rewrite/redirect support back reference to regex conditional using %n
189
+#$HTTP["host"] =~ "^www\.(.*)" {
190
+#	url.redirect = ( "^/(.*)" => "http://%1/$1" )
191
+#}
192
+
193
+#### expire module
194
+#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
195
+
196
+#### ssi
197
+#ssi.extension = ( ".shtml" )
198
+
199
+#### setenv
200
+#setenv.add-request-header  = ( "TRAV_ENV" => "mysql://user@host/db" )
201
+#setenv.add-response-header = ( "X-Secret-Message" => "42" )
202
+
203
+#### variable usage:
204
+## variable name without "." is auto prefixed by "var." and becomes "var.bar"
205
+#bar = 1
206
+#var.mystring = "foo"
207
+
208
+## integer add
209
+#bar += 1
210
+## string concat, with integer cast as string, result: "www.foo1.com"
211
+#server.name = "www." + mystring + var.bar + ".com"
212
+## array merge
213
+#index-file.names = (foo + ".php") + index-file.names
214
+#index-file.names += (foo + ".php")
215
+
216
+#### include
217
+#include /etc/lighttpd/lighttpd-inc.conf
218
+## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
219
+#include "lighttpd-inc.conf"
220
+
221
+#### include_shell
222
+#include_shell "echo var.a=1"
223
+## the above is same as:
224
+#var.a=1
225
+
226
+#### webdav
227
+#$HTTP["url"] =~ "^/webdav($|/)" {
228
+# webdav.activate = "enable"
229
+# webdav.is-readonly = "enable"
230
+# webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
231
+#}

+ 16
- 0
net/lighttpd/files/lighttpd.init View File

@@ -0,0 +1,16 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2006-2011 OpenWrt.org
3
+
4
+SERVICE_USE_PID=1
5
+
6
+START=50
7
+
8
+start() {
9
+	mkdir -m 0755 -p /var/log/lighttpd
10
+	service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
11
+}
12
+
13
+stop() {
14
+	service_stop /usr/sbin/lighttpd
15
+}
16
+