diff options
author | Zhai Edwin <edwin.zhai@intel.com> | 2010-09-28 16:00:25 +0800 |
---|---|---|
committer | Saul Wold <Saul.Wold@intel.com> | 2010-09-28 08:26:53 -0700 |
commit | a1d1e4e47db18607be6158efd993a5ad531ce85e (patch) | |
tree | 9def95d10818551d9dbf843b2d4e6c599f5f1edf | |
parent | ec4d6b989aad5f4564e367c99c62c59f962b57ea (diff) | |
download | poky-a1d1e4e47db18607be6158efd993a5ad531ce85e.tar.gz |
lighttpd: Add 1.4.28 as new recipe.
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-rw-r--r-- | meta/recipes-extended/lighttpd/files/index.html | 1 | ||||
-rw-r--r-- | meta/recipes-extended/lighttpd/files/lighttpd | 34 | ||||
-rw-r--r-- | meta/recipes-extended/lighttpd/files/lighttpd.conf | 328 | ||||
-rw-r--r-- | meta/recipes-extended/lighttpd/lighttpd_1.4.28.bb | 60 |
4 files changed, 423 insertions, 0 deletions
diff --git a/meta/recipes-extended/lighttpd/files/index.html b/meta/recipes-extended/lighttpd/files/index.html new file mode 100644 index 0000000000..cd25bf17b3 --- /dev/null +++ b/meta/recipes-extended/lighttpd/files/index.html | |||
@@ -0,0 +1 @@ | |||
<html><body><h1>It works!</h1></body></html> \ No newline at end of file | |||
diff --git a/meta/recipes-extended/lighttpd/files/lighttpd b/meta/recipes-extended/lighttpd/files/lighttpd new file mode 100644 index 0000000000..bf89a60b7d --- /dev/null +++ b/meta/recipes-extended/lighttpd/files/lighttpd | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
4 | DAEMON=/usr/sbin/lighttpd | ||
5 | NAME=lighttpd | ||
6 | DESC="Lighttpd Web Server" | ||
7 | OPTS="-f /etc/lighttpd.conf" | ||
8 | |||
9 | case "$1" in | ||
10 | start) | ||
11 | echo -n "Starting $DESC: " | ||
12 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | ||
13 | echo "$NAME." | ||
14 | ;; | ||
15 | stop) | ||
16 | echo -n "Stopping $DESC: " | ||
17 | start-stop-daemon --stop -x "$DAEMON" | ||
18 | echo "$NAME." | ||
19 | ;; | ||
20 | restart|force-reload) | ||
21 | echo -n "Restarting $DESC: " | ||
22 | start-stop-daemon --stop -x "$DAEMON" | ||
23 | sleep 1 | ||
24 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | ||
25 | echo "$NAME." | ||
26 | ;; | ||
27 | *) | ||
28 | N=/etc/init.d/$NAME | ||
29 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 | ||
30 | exit 1 | ||
31 | ;; | ||
32 | esac | ||
33 | |||
34 | exit 0 | ||
diff --git a/meta/recipes-extended/lighttpd/files/lighttpd.conf b/meta/recipes-extended/lighttpd/files/lighttpd.conf new file mode 100644 index 0000000000..3342470cec --- /dev/null +++ b/meta/recipes-extended/lighttpd/files/lighttpd.conf | |||
@@ -0,0 +1,328 @@ | |||
1 | # lighttpd configuration file | ||
2 | # | ||
3 | # use it as a base for lighttpd 1.0.0 and above | ||
4 | # | ||
5 | # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $ | ||
6 | |||
7 | ############ Options you really have to take care of #################### | ||
8 | |||
9 | ## modules to load | ||
10 | # at least mod_access and mod_accesslog should be loaded | ||
11 | # all other module should only be loaded if really neccesary | ||
12 | # - saves some time | ||
13 | # - saves memory | ||
14 | server.modules = ( | ||
15 | # "mod_rewrite", | ||
16 | # "mod_redirect", | ||
17 | # "mod_alias", | ||
18 | "mod_access", | ||
19 | # "mod_cml", | ||
20 | # "mod_trigger_b4_dl", | ||
21 | # "mod_auth", | ||
22 | # "mod_status", | ||
23 | # "mod_setenv", | ||
24 | # "mod_fastcgi", | ||
25 | # "mod_proxy", | ||
26 | # "mod_simple_vhost", | ||
27 | # "mod_evhost", | ||
28 | # "mod_userdir", | ||
29 | # "mod_cgi", | ||
30 | # "mod_compress", | ||
31 | # "mod_ssi", | ||
32 | # "mod_usertrack", | ||
33 | # "mod_expire", | ||
34 | # "mod_secdownload", | ||
35 | # "mod_rrdtool", | ||
36 | # "mod_webdav", | ||
37 | "mod_accesslog" ) | ||
38 | |||
39 | ## a static document-root, for virtual-hosting take look at the | ||
40 | ## server.virtual-* options | ||
41 | server.document-root = "/www/pages/" | ||
42 | |||
43 | ## where to send error-messages to | ||
44 | server.errorlog = "/www/logs/lighttpd.error.log" | ||
45 | |||
46 | # files to check for if .../ is requested | ||
47 | index-file.names = ( "index.php", "index.html", | ||
48 | "index.htm", "default.htm" ) | ||
49 | |||
50 | ## set the event-handler (read the performance section in the manual) | ||
51 | # server.event-handler = "freebsd-kqueue" # needed on OS X | ||
52 | |||
53 | # mimetype mapping | ||
54 | mimetype.assign = ( | ||
55 | ".pdf" => "application/pdf", | ||
56 | ".sig" => "application/pgp-signature", | ||
57 | ".spl" => "application/futuresplash", | ||
58 | ".class" => "application/octet-stream", | ||
59 | ".ps" => "application/postscript", | ||
60 | ".torrent" => "application/x-bittorrent", | ||
61 | ".dvi" => "application/x-dvi", | ||
62 | ".gz" => "application/x-gzip", | ||
63 | ".pac" => "application/x-ns-proxy-autoconfig", | ||
64 | ".swf" => "application/x-shockwave-flash", | ||
65 | ".tar.gz" => "application/x-tgz", | ||
66 | ".tgz" => "application/x-tgz", | ||
67 | ".tar" => "application/x-tar", | ||
68 | ".zip" => "application/zip", | ||
69 | ".mp3" => "audio/mpeg", | ||
70 | ".m3u" => "audio/x-mpegurl", | ||
71 | ".wma" => "audio/x-ms-wma", | ||
72 | ".wax" => "audio/x-ms-wax", | ||
73 | ".ogg" => "application/ogg", | ||
74 | ".wav" => "audio/x-wav", | ||
75 | ".gif" => "image/gif", | ||
76 | ".jpg" => "image/jpeg", | ||
77 | ".jpeg" => "image/jpeg", | ||
78 | ".png" => "image/png", | ||
79 | ".xbm" => "image/x-xbitmap", | ||
80 | ".xpm" => "image/x-xpixmap", | ||
81 | ".xwd" => "image/x-xwindowdump", | ||
82 | ".css" => "text/css", | ||
83 | ".html" => "text/html", | ||
84 | ".htm" => "text/html", | ||
85 | ".js" => "text/javascript", | ||
86 | ".asc" => "text/plain", | ||
87 | ".c" => "text/plain", | ||
88 | ".cpp" => "text/plain", | ||
89 | ".log" => "text/plain", | ||
90 | ".conf" => "text/plain", | ||
91 | ".text" => "text/plain", | ||
92 | ".txt" => "text/plain", | ||
93 | ".dtd" => "text/xml", | ||
94 | ".xml" => "text/xml", | ||
95 | ".mpeg" => "video/mpeg", | ||
96 | ".mpg" => "video/mpeg", | ||
97 | ".mov" => "video/quicktime", | ||
98 | ".qt" => "video/quicktime", | ||
99 | ".avi" => "video/x-msvideo", | ||
100 | ".asf" => "video/x-ms-asf", | ||
101 | ".asx" => "video/x-ms-asf", | ||
102 | ".wmv" => "video/x-ms-wmv", | ||
103 | ".bz2" => "application/x-bzip", | ||
104 | ".tbz" => "application/x-bzip-compressed-tar", | ||
105 | ".tar.bz2" => "application/x-bzip-compressed-tar" | ||
106 | ) | ||
107 | |||
108 | # Use the "Content-Type" extended attribute to obtain mime type if possible | ||
109 | #mimetype.use-xattr = "enable" | ||
110 | |||
111 | |||
112 | ## send a different Server: header | ||
113 | ## be nice and keep it at lighttpd | ||
114 | # server.tag = "lighttpd" | ||
115 | |||
116 | #### accesslog module | ||
117 | accesslog.filename = "/www/logs/access.log" | ||
118 | debug.log-request-handling = "enable" | ||
119 | |||
120 | |||
121 | |||
122 | |||
123 | ## deny access the file-extensions | ||
124 | # | ||
125 | # ~ is for backupfiles from vi, emacs, joe, ... | ||
126 | # .inc is often used for code includes which should in general not be part | ||
127 | # of the document-root | ||
128 | url.access-deny = ( "~", ".inc" ) | ||
129 | |||
130 | $HTTP["url"] =~ "\.pdf$" { | ||
131 | server.range-requests = "disable" | ||
132 | } | ||
133 | |||
134 | ## | ||
135 | # which extensions should not be handle via static-file transfer | ||
136 | # | ||
137 | # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi | ||
138 | static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) | ||
139 | |||
140 | ######### Options that are good to be but not neccesary to be changed ####### | ||
141 | |||
142 | ## bind to port (default: 80) | ||
143 | #server.port = 81 | ||
144 | |||
145 | ## bind to localhost (default: all interfaces) | ||
146 | #server.bind = "grisu.home.kneschke.de" | ||
147 | |||
148 | ## error-handler for status 404 | ||
149 | #server.error-handler-404 = "/error-handler.html" | ||
150 | #server.error-handler-404 = "/error-handler.php" | ||
151 | |||
152 | ## to help the rc.scripts | ||
153 | #server.pid-file = "/var/run/lighttpd.pid" | ||
154 | |||
155 | |||
156 | ###### virtual hosts | ||
157 | ## | ||
158 | ## If you want name-based virtual hosting add the next three settings and load | ||
159 | ## mod_simple_vhost | ||
160 | ## | ||
161 | ## document-root = | ||
162 | ## virtual-server-root + virtual-server-default-host + virtual-server-docroot | ||
163 | ## or | ||
164 | ## virtual-server-root + http-host + virtual-server-docroot | ||
165 | ## | ||
166 | #simple-vhost.server-root = "/home/weigon/wwwroot/servers/" | ||
167 | #simple-vhost.default-host = "grisu.home.kneschke.de" | ||
168 | #simple-vhost.document-root = "/pages/" | ||
169 | |||
170 | |||
171 | ## | ||
172 | ## Format: <errorfile-prefix><status-code>.html | ||
173 | ## -> ..../status-404.html for 'File not found' | ||
174 | #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-" | ||
175 | |||
176 | ## virtual directory listings | ||
177 | #dir-listing.activate = "enable" | ||
178 | |||
179 | ## enable debugging | ||
180 | #debug.log-request-header = "enable" | ||
181 | #debug.log-response-header = "enable" | ||
182 | #debug.log-request-handling = "enable" | ||
183 | #debug.log-file-not-found = "enable" | ||
184 | |||
185 | ### only root can use these options | ||
186 | # | ||
187 | # chroot() to directory (default: no chroot() ) | ||
188 | #server.chroot = "/" | ||
189 | |||
190 | ## change uid to <uid> (default: don't care) | ||
191 | #server.username = "wwwrun" | ||
192 | |||
193 | ## change uid to <uid> (default: don't care) | ||
194 | #server.groupname = "wwwrun" | ||
195 | |||
196 | #### compress module | ||
197 | #compress.cache-dir = "/tmp/lighttpd/cache/compress/" | ||
198 | #compress.filetype = ("text/plain", "text/html") | ||
199 | |||
200 | #### proxy module | ||
201 | ## read proxy.txt for more info | ||
202 | #proxy.server = ( ".php" => | ||
203 | # ( "localhost" => | ||
204 | # ( | ||
205 | # "host" => "192.168.0.101", | ||
206 | # "port" => 80 | ||
207 | # ) | ||
208 | # ) | ||
209 | # ) | ||
210 | |||
211 | #### fastcgi module | ||
212 | ## read fastcgi.txt for more info | ||
213 | ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini | ||
214 | #fastcgi.server = ( ".php" => | ||
215 | # ( "localhost" => | ||
216 | # ( | ||
217 | # "socket" => "/tmp/php-fastcgi.socket", | ||
218 | # "bin-path" => "/usr/local/bin/php" | ||
219 | # ) | ||
220 | # ) | ||
221 | # ) | ||
222 | |||
223 | #### CGI module | ||
224 | #cgi.assign = ( ".pl" => "/usr/bin/perl", | ||
225 | # ".cgi" => "/usr/bin/perl" ) | ||
226 | # | ||
227 | |||
228 | #### SSL engine | ||
229 | #ssl.engine = "enable" | ||
230 | #ssl.pemfile = "server.pem" | ||
231 | |||
232 | #### status module | ||
233 | #status.status-url = "/server-status" | ||
234 | #status.config-url = "/server-config" | ||
235 | |||
236 | #### auth module | ||
237 | ## read authentication.txt for more info | ||
238 | #auth.backend = "plain" | ||
239 | #auth.backend.plain.userfile = "lighttpd.user" | ||
240 | #auth.backend.plain.groupfile = "lighttpd.group" | ||
241 | |||
242 | #auth.backend.ldap.hostname = "localhost" | ||
243 | #auth.backend.ldap.base-dn = "dc=my-domain,dc=com" | ||
244 | #auth.backend.ldap.filter = "(uid=$)" | ||
245 | |||
246 | #auth.require = ( "/server-status" => | ||
247 | # ( | ||
248 | # "method" => "digest", | ||
249 | # "realm" => "download archiv", | ||
250 | # "require" => "user=jan" | ||
251 | # ), | ||
252 | # "/server-config" => | ||
253 | # ( | ||
254 | # "method" => "digest", | ||
255 | # "realm" => "download archiv", | ||
256 | # "require" => "valid-user" | ||
257 | # ) | ||
258 | # ) | ||
259 | |||
260 | #### url handling modules (rewrite, redirect, access) | ||
261 | #url.rewrite = ( "^/$" => "/server-status" ) | ||
262 | #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" ) | ||
263 | |||
264 | #### both rewrite/redirect support back reference to regex conditional using %n | ||
265 | #$HTTP["host"] =~ "^www\.(.*)" { | ||
266 | # url.redirect = ( "^/(.*)" => "http://%1/$1" ) | ||
267 | #} | ||
268 | |||
269 | # | ||
270 | # define a pattern for the host url finding | ||
271 | # %% => % sign | ||
272 | # %0 => domain name + tld | ||
273 | # %1 => tld | ||
274 | # %2 => domain name without tld | ||
275 | # %3 => subdomain 1 name | ||
276 | # %4 => subdomain 2 name | ||
277 | # | ||
278 | #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" | ||
279 | |||
280 | #### expire module | ||
281 | #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") | ||
282 | |||
283 | #### ssi | ||
284 | #ssi.extension = ( ".shtml" ) | ||
285 | |||
286 | #### rrdtool | ||
287 | #rrdtool.binary = "/usr/bin/rrdtool" | ||
288 | #rrdtool.db-name = "/var/www/lighttpd.rrd" | ||
289 | |||
290 | #### setenv | ||
291 | #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) | ||
292 | #setenv.add-response-header = ( "X-Secret-Message" => "42" ) | ||
293 | |||
294 | ## for mod_trigger_b4_dl | ||
295 | # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db" | ||
296 | # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" ) | ||
297 | # trigger-before-download.trigger-url = "^/trigger/" | ||
298 | # trigger-before-download.download-url = "^/download/" | ||
299 | # trigger-before-download.deny-url = "http://127.0.0.1/index.html" | ||
300 | # trigger-before-download.trigger-timeout = 10 | ||
301 | |||
302 | ## for mod_cml | ||
303 | ## don't forget to add index.cml to server.indexfiles | ||
304 | # cml.extension = ".cml" | ||
305 | # cml.memcache-hosts = ( "127.0.0.1:11211" ) | ||
306 | |||
307 | #### variable usage: | ||
308 | ## variable name without "." is auto prefixed by "var." and becomes "var.bar" | ||
309 | #bar = 1 | ||
310 | #var.mystring = "foo" | ||
311 | |||
312 | ## integer add | ||
313 | #bar += 1 | ||
314 | ## string concat, with integer cast as string, result: "www.foo1.com" | ||
315 | #server.name = "www." + mystring + var.bar + ".com" | ||
316 | ## array merge | ||
317 | #index-file.names = (foo + ".php") + index-file.names | ||
318 | #index-file.names += (foo + ".php") | ||
319 | |||
320 | #### include | ||
321 | #include /etc/lighttpd/lighttpd-inc.conf | ||
322 | ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" | ||
323 | #include "lighttpd-inc.conf" | ||
324 | |||
325 | #### include_shell | ||
326 | #include_shell "echo var.a=1" | ||
327 | ## the above is same as: | ||
328 | #var.a=1 | ||
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.28.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.28.bb new file mode 100644 index 0000000000..f85c3c4dbf --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.28.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | DESCRIPTION = "Lightweight high-performance web server" | ||
2 | HOMEPAGE = "http://www.lighttpd.net/" | ||
3 | BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" | ||
4 | |||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" | ||
7 | |||
8 | |||
9 | SECTION = "net" | ||
10 | DEPENDS = "zlib libpcre" | ||
11 | RDEPENDS_${PN} += " \ | ||
12 | lighttpd-module-access \ | ||
13 | lighttpd-module-accesslog \ | ||
14 | lighttpd-module-indexfile \ | ||
15 | lighttpd-module-dirlisting \ | ||
16 | lighttpd-module-staticfile \ | ||
17 | " | ||
18 | |||
19 | PR = "r0" | ||
20 | |||
21 | SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.gz;name=src \ | ||
22 | file://index.html \ | ||
23 | file://lighttpd.conf \ | ||
24 | file://lighttpd \ | ||
25 | " | ||
26 | |||
27 | EXTRA_OECONF = " \ | ||
28 | --without-bzip2 \ | ||
29 | --without-ldap \ | ||
30 | --without-lua \ | ||
31 | --without-memcache \ | ||
32 | --with-pcre \ | ||
33 | --without-webdav-props \ | ||
34 | --without-webdav-locks \ | ||
35 | --without-openssl \ | ||
36 | --disable-static \ | ||
37 | " | ||
38 | |||
39 | inherit autotools pkgconfig update-rc.d gettext | ||
40 | |||
41 | INITSCRIPT_NAME = "lighttpd" | ||
42 | INITSCRIPT_PARAMS = "defaults 70" | ||
43 | |||
44 | do_install_append() { | ||
45 | install -d ${D}${sysconfdir}/init.d ${D}/www/logs ${D}/www/pages/dav ${D}/www/var | ||
46 | install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d | ||
47 | install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir} | ||
48 | install -m 0644 ${WORKDIR}/index.html ${D}/www/pages/ | ||
49 | } | ||
50 | |||
51 | FILES_${PN} += "${sysconfdir} /www" | ||
52 | |||
53 | CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf" | ||
54 | |||
55 | PACKAGES_DYNAMIC = "lighttpd-module-*" | ||
56 | |||
57 | python populate_packages_prepend () { | ||
58 | lighttpd_libdir = bb.data.expand('${libdir}', d) | ||
59 | do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') | ||
60 | } | ||