|
@@ -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))
|