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