2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=http
://www.lighttpd.net
/download
/
18 PKG_MD5SUM
:=b994b8c359da578dec073cae52c4924f
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/lighttpd
/Default
28 URL
:=http
://www.lighttpd.net
/
31 define Package
/lighttpd
32 $(call Package
/lighttpd
/Default
)
36 DEPENDS
:=+libopenssl
+libpcre
+libpthread
+libsqlite3
+libxml2
37 TITLE
:=A flexible and lightweight web server
38 URL
:=http
://www.lighttpd.net
/
41 define Package
/lighttpd
/conffiles
47 define Package
/lighttpd-mod-accesslog
48 $(call Package
/lighttpd
/Default
)
50 TITLE
:=Access logging module
53 define Package
/lighttpd-mod-alias
54 $(call Package
/lighttpd
/Default
)
56 TITLE
:=Directory alias module
59 define Package
/lighttpd-mod-auth
60 $(call Package
/lighttpd
/Default
)
62 TITLE
:=Authentication module
65 define Package
/lighttpd-mod-cgi
66 $(call Package
/lighttpd
/Default
)
71 define Package
/lighttpd-mod-evasive
72 $(call Package
/lighttpd
/Default
)
77 define Package
/lighttpd-mod-expire
78 $(call Package
/lighttpd
/Default
)
83 define Package
/lighttpd-mod-fastcgi
84 $(call Package
/lighttpd
/Default
)
89 define Package
/lighttpd-mod-proxy
90 $(call Package
/lighttpd
/Default
)
95 define Package
/lighttpd-mod-redirect
96 $(call Package
/lighttpd
/Default
)
98 TITLE
:=URL redirection module
101 define Package
/lighttpd-mod-rewrite
102 $(call Package
/lighttpd
/Default
)
104 TITLE
:=URL rewriting module
107 define Package
/lighttpd-mod-setenv
108 $(call Package
/lighttpd
/Default
)
110 TITLE
:=Environment variable setting module
113 define Package
/lighttpd-mod-simple-vhost
114 $(call Package
/lighttpd
/Default
)
116 TITLE
:=Simple virtual hosting module
119 define Package
/lighttpd-mod-ssi
120 $(call Package
/lighttpd
/Default
)
125 define Package
/lighttpd-mod-status
126 $(call Package
/lighttpd
/Default
)
128 TITLE
:=Server status display module
131 define Package
/lighttpd-mod-usertrack
132 $(call Package
/lighttpd
/Default
)
134 TITLE
:=User tracking module
137 define Package
/lighttpd-mod-webdav
138 $(call Package
/lighttpd
/Default
)
144 define Build
/Configure
145 $(call Build
/Configure
/Default
, \
146 --libdir=/usr
/lib
/lighttpd \
147 --sysconfdir
=/etc
/lighttpd \
159 --with-openssl
="$(STAGING_DIR)/usr" \
162 --with-webdav-props \
164 CPPFLAGS
="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS" \
170 rm -rf
$(PKG_INSTALL_DIR
)
171 mkdir
-p
$(PKG_INSTALL_DIR
)
172 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
173 DESTDIR
="$(PKG_INSTALL_DIR)" \
177 define Package
/lighttpd
/install
178 $(INSTALL_DIR
) $(1)/etc
179 $(INSTALL_DATA
) .
/files
/lighttpd.conf
$(1)/etc
/
180 $(INSTALL_DIR
) $(1)/etc
/default
181 $(INSTALL_DATA
) .
/files
/lighttpd.default
$(1)/etc
/default
/lighttpd
182 $(INSTALL_DIR
) $(1)/etc
/init.d
183 $(INSTALL_BIN
) .
/files
/lighttpd.init
$(1)/etc
/init.d
/lighttpd
184 $(INSTALL_DIR
) $(1)/usr
/lib
/lighttpd
185 for m in dirlisting indexfile staticfile
; do \
186 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$$$${m}.so
$(1)/usr
/lib
/lighttpd
/ ; \
188 $(INSTALL_DIR
) $(1)/usr
/sbin
189 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/lighttpd
$(1)/usr
/sbin
/
193 define Package
/$(1)/install
194 [ -z
"$(2)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/lighttpd
196 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$$$$$$$${m}.so
$$(1)/usr
/lib
/lighttpd
/ ; \
200 $$(eval
$$(call BuildPackage
,$(1)))
203 $(eval
$(call BuildPackage
,lighttpd
))
204 $(eval
$(call BuildPlugin
,lighttpd-mod-accesslog
,accesslog
))
205 $(eval
$(call BuildPlugin
,lighttpd-mod-alias
,alias
))
206 $(eval
$(call BuildPlugin
,lighttpd-mod-auth
,auth
))
207 $(eval
$(call BuildPlugin
,lighttpd-mod-cgi
,cgi
))
208 $(eval
$(call BuildPlugin
,lighttpd-mod-evasive
,evasive
))
209 $(eval
$(call BuildPlugin
,lighttpd-mod-expire
, expire
))
210 $(eval
$(call BuildPlugin
,lighttpd-mod-fastcgi
,fastcgi
))
211 $(eval
$(call BuildPlugin
,lighttpd-mod-proxy
,proxy
))
212 $(eval
$(call BuildPlugin
,lighttpd-mod-redirect
,redirect
))
213 $(eval
$(call BuildPlugin
,lighttpd-mod-rewrite
,rewrite
))
214 $(eval
$(call BuildPlugin
,lighttpd-mod-setenv
,setenv
))
215 $(eval
$(call BuildPlugin
,lighttpd-mod-simple-vhost
,simple_vhost
))
216 $(eval
$(call BuildPlugin
,lighttpd-mod-ssi
,ssi
))
217 $(eval
$(call BuildPlugin
,lighttpd-mod-status
,status
))
218 $(eval
$(call BuildPlugin
,lighttpd-mod-usertrack
,usertrack
))
219 $(eval
$(call BuildPlugin
,lighttpd-mod-webdav
,webdav
))