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.gz
17 PKG_SOURCE_URL
:=http
://www.lighttpd.net
/download
/
18 PKG_MD5SUM
:=d775d6478391b95d841a1018c8db0b95
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/lighttpd
29 DEPENDS
:=+libopenssl
+libpcre
+libpthread
+libsqlite3
+libxml2
30 TITLE
:=A flexible and lightweight web server
31 URL
:=http
://www.lighttpd.net
/
34 define Package
/lighttpd
/conffiles
40 define Package
/lighttpd-mod-accesslog
41 $(call Package
/lighttpd
)
43 TITLE
:=Access logging module
46 define Package
/lighttpd-mod-alias
47 $(call Package
/lighttpd
)
49 TITLE
:=Directory alias module
52 define Package
/lighttpd-mod-auth
53 $(call Package
/lighttpd
)
55 TITLE
:=Authentication module
58 define Package
/lighttpd-mod-cgi
59 $(call Package
/lighttpd
)
64 define Package
/lighttpd-mod-evasive
65 $(call Package
/lighttpd
)
70 define Package
/lighttpd-mod-expire
71 $(call Package
/lighttpd
)
76 define Package
/lighttpd-mod-fastcgi
77 $(call Package
/lighttpd
)
82 define Package
/lighttpd-mod-proxy
83 $(call Package
/lighttpd
)
88 define Package
/lighttpd-mod-redirect
89 $(call Package
/lighttpd
)
91 TITLE
:=URL redirection module
94 define Package
/lighttpd-mod-rewrite
95 $(call Package
/lighttpd
)
97 TITLE
:=URL rewriting module
100 define Package
/lighttpd-mod-setenv
101 $(call Package
/lighttpd
)
103 TITLE
:=Environment variable setting module
106 define Package
/lighttpd-mod-simple-vhost
107 $(call Package
/lighttpd
)
109 TITLE
:=Simple virtual hosting module
112 define Package
/lighttpd-mod-ssi
113 $(call Package
/lighttpd
)
118 define Package
/lighttpd-mod-status
119 $(call Package
/lighttpd
)
121 TITLE
:=Server status display module
124 define Package
/lighttpd-mod-usertrack
125 $(call Package
/lighttpd
)
127 TITLE
:=User tracking module
130 define Package
/lighttpd-mod-webdav
131 $(call Package
/lighttpd
)
136 define Build
/Configure
137 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
138 $(TARGET_CONFIGURE_OPTS
) \
139 CFLAGS
="$(TARGET_CFLAGS)" \
140 CPPFLAGS
="-I$(STAGING_DIR)/usr/include/libxml2 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
141 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
143 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig" \
145 --target
=$(GNU_TARGET_NAME
) \
146 --host
=$(GNU_TARGET_NAME
) \
147 --build
=$(GNU_HOST_NAME
) \
148 --program-prefix
="" \
149 --program-suffix
="" \
153 --datadir=/usr
/share \
154 --includedir=/usr
/include \
155 --infodir=/usr
/share
/info \
156 --libdir=/usr
/lib
/lighttpd \
157 --libexecdir
=/usr
/lib \
158 --localstatedir
=/var \
159 --mandir=/usr
/share
/man \
160 --sbindir
=/usr
/sbin \
161 --sysconfdir
=/etc
/lighttpd \
162 $(DISABLE_LARGEFILE
) \
175 --with-openssl
="$(STAGING_DIR)/usr" \
178 --with-webdav-props \
183 rm -rf
$(PKG_INSTALL_DIR
)
184 mkdir
-p
$(PKG_INSTALL_DIR
)
185 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
186 DESTDIR
="$(PKG_INSTALL_DIR)" \
190 define Package
/lighttpd
/install
191 $(INSTALL_DIR
) $(1)/etc
192 $(INSTALL_DATA
) .
/files
/lighttpd.conf
$(1)/etc
/
193 $(INSTALL_DIR
) $(1)/etc
/default
194 $(INSTALL_DATA
) .
/files
/lighttpd.default
$(1)/etc
/default
/lighttpd
195 $(INSTALL_DIR
) $(1)/etc
/init.d
196 $(INSTALL_BIN
) .
/files
/lighttpd.init
$(1)/etc
/init.d
/lighttpd
197 $(INSTALL_DIR
) $(1)/usr
/lib
/lighttpd
198 for m in dirlisting indexfile staticfile
; do \
199 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$$$${m}.so
$(1)/usr
/lib
/lighttpd
/ ; \
201 $(INSTALL_DIR
) $(1)/usr
/sbin
202 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/lighttpd
$(1)/usr
/sbin
/
206 define Package
/$(1)/install
207 [ -z
"$(2)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/lighttpd
209 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$$$$$$$${m}.so
$$(1)/usr
/lib
/lighttpd
/ ; \
213 $$(eval
$$(call BuildPackage
,$(1)))
216 $(eval
$(call BuildPackage
,lighttpd
))
217 $(eval
$(call BuildPlugin
,lighttpd-mod-accesslog
,accesslog
))
218 $(eval
$(call BuildPlugin
,lighttpd-mod-alias
,alias
))
219 $(eval
$(call BuildPlugin
,lighttpd-mod-auth
,auth
))
220 $(eval
$(call BuildPlugin
,lighttpd-mod-cgi
,cgi
))
221 $(eval
$(call BuildPlugin
,lighttpd-mod-evasive
,evasive
))
222 $(eval
$(call BuildPlugin
,lighttpd-mod-expire
, expire
))
223 $(eval
$(call BuildPlugin
,lighttpd-mod-fastcgi
,fastcgi
))
224 $(eval
$(call BuildPlugin
,lighttpd-mod-proxy
,proxy
))
225 $(eval
$(call BuildPlugin
,lighttpd-mod-redirect
,redirect
))
226 $(eval
$(call BuildPlugin
,lighttpd-mod-rewrite
,rewrite
))
227 $(eval
$(call BuildPlugin
,lighttpd-mod-setenv
,setenv
))
228 $(eval
$(call BuildPlugin
,lighttpd-mod-simple-vhost
,simple_vhost
))
229 $(eval
$(call BuildPlugin
,lighttpd-mod-ssi
,ssi
))
230 $(eval
$(call BuildPlugin
,lighttpd-mod-status
,status
))
231 $(eval
$(call BuildPlugin
,lighttpd-mod-usertrack
,usertrack
))
232 $(eval
$(call BuildPlugin
,lighttpd-mod-webdav
,webdav
))