[packages] ink: indent with tabs (closes: #5115), remove unneeded variables
[openwrt/svn-archive/archive.git] / net / lighttpd / Makefile
1 #
2 # Copyright (C) 2006-2009 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.22
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.lighttpd.net/download/
16 PKG_MD5SUM:=ed4ca3897eadf419c893b03fee53c982
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/lighttpd/Default
21 SUBMENU:=Web
22 SECTION:=net
23 CATEGORY:=Network
24 URL:=http://www.lighttpd.net/
25 endef
26
27 define Package/lighttpd
28 $(call Package/lighttpd/Default)
29 MENU:=1
30 DEPENDS:=+libopenssl +libpcre +libpthread
31 TITLE:=A flexible and lightweight web server
32 endef
33
34 define Package/lighttpd-mod-access
35 $(call Package/lighttpd/Default)
36 DEPENDS:=lighttpd
37 TITLE:=Access restrictions module
38 endef
39
40 define Package/lighttpd-mod-accesslog
41 $(call Package/lighttpd/Default)
42 DEPENDS:=lighttpd
43 TITLE:=Access logging module
44 endef
45
46 define Package/lighttpd-mod-alias
47 $(call Package/lighttpd/Default)
48 DEPENDS:=lighttpd
49 TITLE:=Directory alias module
50 endef
51
52 define Package/lighttpd-mod-auth
53 $(call Package/lighttpd/Default)
54 DEPENDS:=lighttpd
55 TITLE:=Authentication module
56 endef
57
58 define Package/lighttpd-mod-cgi
59 $(call Package/lighttpd/Default)
60 DEPENDS:=lighttpd
61 TITLE:=CGI module
62 endef
63
64 define Package/lighttpd-mod-cml
65 $(call Package/lighttpd/Default)
66 DEPENDS:=lighttpd
67 TITLE:=Cache Meta Language module
68 endef
69
70 define Package/lighttpd-mod-compress
71 $(call Package/lighttpd/Default)
72 DEPENDS:=lighttpd +zlib
73 TITLE:=Compress output module
74 endef
75
76 define Package/lighttpd-mod-evasive
77 $(call Package/lighttpd/Default)
78 DEPENDS:=lighttpd
79 TITLE:=Evasive module
80 endef
81
82 define Package/lighttpd-mod-expire
83 $(call Package/lighttpd/Default)
84 DEPENDS:=lighttpd
85 TITLE:=Expire module
86 endef
87
88 define Package/lighttpd-mod-extforward
89 $(call Package/lighttpd/Default)
90 DEPENDS:=lighttpd
91 TITLE:=Extract client IP module
92 endef
93
94 define Package/lighttpd-mod-fastcgi
95 $(call Package/lighttpd/Default)
96 DEPENDS:=lighttpd
97 TITLE:=FastCGI module
98 endef
99
100 define Package/lighttpd-mod-flv-streaming
101 $(call Package/lighttpd/Default)
102 DEPENDS:=lighttpd
103 TITLE:=flv streaming module
104 endef
105
106 define Package/lighttpd-mod-magnet
107 $(call Package/lighttpd/Default)
108 DEPENDS:=lighttpd
109 TITLE:=magnet module
110 endef
111
112 define Package/lighttpd-mod-mysql-vhost
113 $(call Package/lighttpd/Default)
114 DEPENDS:=lighttpd +libmysqlclient
115 TITLE:=Mysql virtual hosting module
116 endef
117
118 define Package/lighttpd-mod-proxy
119 $(call Package/lighttpd/Default)
120 DEPENDS:=lighttpd
121 TITLE:=Proxy module
122 endef
123
124 define Package/lighttpd-mod-redirect
125 $(call Package/lighttpd/Default)
126 DEPENDS:=lighttpd +libpcre
127 TITLE:=URL redirection module
128 endef
129
130 define Package/lighttpd-mod-rewrite
131 $(call Package/lighttpd/Default)
132 DEPENDS:=lighttpd +libpcre
133 TITLE:=URL rewriting module
134 endef
135
136 define Package/lighttpd-mod-rrdtool
137 $(call Package/lighttpd/Default)
138 DEPENDS:=lighttpd
139 TITLE:=rrdtool module
140 endef
141
142 define Package/lighttpd-mod-scgi
143 $(call Package/lighttpd/Default)
144 DEPENDS:=lighttpd
145 TITLE:=SCGI module
146 endef
147
148 define Package/lighttpd-mod-secdownload
149 $(call Package/lighttpd/Default)
150 DEPENDS:=lighttpd
151 TITLE:=Secure and fast download module
152 endef
153
154 define Package/lighttpd-mod-setenv
155 $(call Package/lighttpd/Default)
156 DEPENDS:=lighttpd
157 TITLE:=Environment variable setting module
158 endef
159
160 define Package/lighttpd-mod-simple-vhost
161 $(call Package/lighttpd/Default)
162 DEPENDS:=lighttpd
163 TITLE:=Simple virtual hosting module
164 endef
165
166 define Package/lighttpd-mod-ssi
167 $(call Package/lighttpd/Default)
168 DEPENDS:=lighttpd +libpcre
169 TITLE:=SSI module
170 endef
171
172 define Package/lighttpd-mod-status
173 $(call Package/lighttpd/Default)
174 DEPENDS:=lighttpd
175 TITLE:=Server status display module
176 endef
177
178 define Package/lighttpd-mod-trigger-b4-dl
179 $(call Package/lighttpd/Default)
180 DEPENDS:=lighttpd +libpcre
181 TITLE:=Trigger before download module
182 endef
183
184 define Package/lighttpd-mod-userdir
185 $(call Package/lighttpd/Default)
186 DEPENDS:=lighttpd
187 TITLE:=User directory module
188 endef
189
190 define Package/lighttpd-mod-usertrack
191 $(call Package/lighttpd/Default)
192 DEPENDS:=lighttpd
193 TITLE:=User tracking module
194 endef
195
196 define Package/lighttpd-mod-webdav
197 $(call Package/lighttpd/Default)
198 DEPENDS:=lighttpd +libsqlite3 +libxml2
199 TITLE:=WebDAV module
200 endef
201
202
203 ifneq ($(CONFIG_LARGEFILE),y)
204 DISABLE_LARGEFILE:=--disable-lfs
205 endif
206
207 DISABLE_IPV6:=
208
209 CONFIGURE_ARGS+= \
210 --libdir=/usr/lib/lighttpd \
211 --sysconfdir=/etc/lighttpd \
212 --enable-shared \
213 --enable-static \
214 --disable-rpath \
215 $(DISABLE_LARGEFILE) \
216 $(DISABLE_IPV6) \
217 --without-attr \
218 --without-bzip2 \
219 --without-fam \
220 --without-gdbm \
221 --without-ldap \
222 --without-lua \
223 --without-memcache \
224 --without-mysql \
225 --with-openssl="$(STAGING_DIR)/usr" \
226 --with-pcre \
227 --without-valgrind \
228 --with-webdav-props \
229
230 CONFIGURE_VARS+= \
231 CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS" \
232 PCRE_LIB="-lpcre" \
233
234 define Build/Compile
235 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
236 endef
237
238 define Package/lighttpd/conffiles
239 /etc/lighttpd.conf
240 /etc/default/lighttpd
241 endef
242
243 define Package/lighttpd/install
244 $(INSTALL_DIR) $(1)/etc
245 $(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/
246 $(INSTALL_DIR) $(1)/etc/default
247 $(INSTALL_DATA) ./files/lighttpd.default $(1)/etc/default/lighttpd
248 $(INSTALL_DIR) $(1)/etc/init.d
249 $(INSTALL_BIN) ./files/lighttpd.init $(1)/etc/init.d/lighttpd
250 $(INSTALL_DIR) $(1)/usr/lib/lighttpd
251 for m in dirlisting indexfile staticfile; do \
252 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$${m}.so $(1)/usr/lib/lighttpd/ ; \
253 done
254 $(INSTALL_DIR) $(1)/usr/sbin
255 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(1)/usr/sbin/
256 endef
257
258 define BuildPlugin
259 define Package/$(1)/install
260 [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/lighttpd
261 for m in $(2); do \
262 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$$$$$${m}.so $$(1)/usr/lib/lighttpd/ ; \
263 done
264 endef
265
266 $$(eval $$(call BuildPackage,$(1)))
267 endef
268
269 $(eval $(call BuildPackage,lighttpd))
270 $(eval $(call BuildPlugin,lighttpd-mod-access,access))
271 $(eval $(call BuildPlugin,lighttpd-mod-accesslog,accesslog))
272 $(eval $(call BuildPlugin,lighttpd-mod-alias,alias))
273 $(eval $(call BuildPlugin,lighttpd-mod-auth,auth))
274 $(eval $(call BuildPlugin,lighttpd-mod-cgi,cgi))
275 $(eval $(call BuildPlugin,lighttpd-mod-cml,cml))
276 $(eval $(call BuildPlugin,lighttpd-mod-compress,compress))
277 $(eval $(call BuildPlugin,lighttpd-mod-evasive,evasive))
278 $(eval $(call BuildPlugin,lighttpd-mod-expire, expire))
279 $(eval $(call BuildPlugin,lighttpd-mod-extforward, extforward))
280 $(eval $(call BuildPlugin,lighttpd-mod-fastcgi,fastcgi))
281 $(eval $(call BuildPlugin,lighttpd-mod-flv-streaming,flv_streaming))
282 $(eval $(call BuildPlugin,lighttpd-mod-proxy,proxy))
283 $(eval $(call BuildPlugin,lighttpd-mod-redirect,redirect))
284 $(eval $(call BuildPlugin,lighttpd-mod-rewrite,rewrite))
285 $(eval $(call BuildPlugin,lighttpd-mod-rrdtool,rrdtool))
286 $(eval $(call BuildPlugin,lighttpd-mod-scgi,scgi))
287 $(eval $(call BuildPlugin,lighttpd-mod-secdownload,secdownload))
288 $(eval $(call BuildPlugin,lighttpd-mod-setenv,setenv))
289 $(eval $(call BuildPlugin,lighttpd-mod-simple-vhost,simple_vhost))
290 $(eval $(call BuildPlugin,lighttpd-mod-ssi,ssi))
291 $(eval $(call BuildPlugin,lighttpd-mod-status,status))
292 $(eval $(call BuildPlugin,lighttpd-mod-trigger-b4-dl,trigger_b4_dl))
293 $(eval $(call BuildPlugin,lighttpd-mod-userdir,userdir))
294 $(eval $(call BuildPlugin,lighttpd-mod-usertrack,usertrack))
295 $(eval $(call BuildPlugin,lighttpd-mod-webdav,webdav))