2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=https
://download.lighttpd.net
/lighttpd
/releases-1.4.x
16 PKG_MD5SUM
:=a128e1eda76899ce3fd115efae5fe631
19 PKG_LICENSE_FILES
:=COPYING
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/lighttpd
/Default
27 SUBMENU
:=Web Servers
/Proxies
30 URL
:=http
://www.lighttpd.net
/
31 MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
34 define Package
/lighttpd
35 $(call Package
/lighttpd
/Default
)
37 DEPENDS
:=+LIGHTTPD_SSL
:libopenssl
+libpcre
+libpthread
38 TITLE
:=A flexible and lightweight web server
41 define Package
/lighttpd
/config
44 depends on PACKAGE_lighttpd
47 Implements SSL support in lighttpd
(using libopenssl
). This
48 option is required if you enable the SSL engine in your
49 lighttpd confguration file.
53 --libdir=/usr
/lib
/lighttpd \
54 --sysconfdir
=/etc
/lighttpd \
63 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
)
68 ifneq ($(strip $(CONFIG_LIGHTTPD_SSL
)),)
70 --with-openssl
="$(STAGING_DIR)/usr"
76 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-authn_gssapi
),)
77 CONFIGURE_ARGS
+= --with-krb5
79 CONFIGURE_ARGS
+= --without-krb5
82 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-authn_ldap
),)
83 CONFIGURE_ARGS
+= --with-ldap
85 CONFIGURE_ARGS
+= --without-ldap
88 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-authn_mysql
),)
89 CONFIGURE_ARGS
+= --with-mysql
91 CONFIGURE_ARGS
+= --without-mysql
94 #ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-geoip),)
95 # CONFIGURE_ARGS+= --with-geoip
97 # CONFIGURE_ARGS+= --without-geoip
100 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-cml
)$(CONFIG_PACKAGE_lighttpd-mod-magnet
),)
101 CONFIGURE_ARGS
+= --with-lua
103 CONFIGURE_ARGS
+= --without-lua
106 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-mysql_vhost
),)
107 CONFIGURE_ARGS
+= --with-mysql
109 CONFIGURE_ARGS
+= --without-mysql
112 #ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-cml)$(CONFIG_PACKAGE_lighttpd-mod-trigger_b4_dl),)
113 # CONFIGURE_ARGS+= --with-memcached
115 # CONFIGURE_ARGS+= --without-memcached
118 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-trigger_b4_dl
),)
119 CONFIGURE_ARGS
+= --with-gdbm
121 CONFIGURE_ARGS
+= --without-gdbm
124 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-webdav
),)
126 --with-webdav-locks \
128 # XXX: needed by sqlite3 to prevent segfaults in mod_webdav.so
133 --without-webdav-locks \
134 --without-webdav-props
137 define Build
/Configure
138 $(call Build
/Configure
/Default
)
139 # XXX: override pcre (mis)detection by ./configure when cross-compiling
140 echo
"#define HAVE_LIBPCRE 1" >>$(PKG_BUILD_DIR
)/config.h
141 echo
"#define HAVE_PCRE_H 1" >>$(PKG_BUILD_DIR
)/config.h
144 define Package
/lighttpd
/conffiles
145 /etc
/lighttpd
/lighttpd.conf
148 define Package
/lighttpd
/install
149 $(INSTALL_DIR
) $(1)/etc
/lighttpd
150 $(INSTALL_DATA
) .
/files
/lighttpd.conf
$(1)/etc
/lighttpd
/
151 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/doc
/config
/conf.d
/mime.conf
$(1)/etc
/lighttpd
/
152 $(INSTALL_DIR
) $(1)/etc
/lighttpd
/conf.d
153 $(INSTALL_DIR
) $(1)/etc
/init.d
154 $(INSTALL_BIN
) .
/files
/lighttpd.init
$(1)/etc
/init.d
/lighttpd
155 $(INSTALL_DIR
) $(1)/usr
/lib
/lighttpd
156 for m in dirlisting indexfile staticfile
; do \
157 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$$$${m}.so
$(1)/usr
/lib
/lighttpd
/ ; \
159 $(INSTALL_DIR
) $(1)/usr
/sbin
160 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/lighttpd
$(1)/usr
/sbin
/
164 define Package
/lighttpd-mod-
$(1)
165 $(call Package
/lighttpd
/Default
)
173 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-
$(1)),)
174 define Package
/lighttpd-mod-
$(1)/install
175 $(INSTALL_DIR
) $$(1)/usr
/lib
/lighttpd
176 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$(1).so
$$(1)/usr
/lib
/lighttpd
177 $(INSTALL_DIR
) $$(1)/etc
/lighttpd
/conf.d
178 if
[ -f
$(PKG_BUILD_DIR
)/doc
/config
/conf.d
/$(1).conf
]; then \
179 $(CP
) $(PKG_BUILD_DIR
)/doc
/config
/conf.d
/$(1).conf
$$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; \
181 echo
'server.modules += ( "mod_$(1)" )' > $$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; \
186 $$(eval
$$(call BuildPackage
,lighttpd-mod-
$(1)))
189 $(eval
$(call BuildPackage
,lighttpd
))
191 # First, permit redirect from HTTP to HTTPS.
192 $(eval
$(call BuildPlugin
,redirect
,URL redirection
,+PACKAGE_lighttpd-mod-redirect
:libpcre
,10))
194 # Next, permit authentication.
195 $(eval
$(call BuildPlugin
,auth
,Authentication
,,20))
196 $(eval
$(call BuildPlugin
,authn_file
,File-based authentication
,,20))
197 $(eval
$(call BuildPlugin
,authn_gssapi
,Kerberos-based authentication
,+PACKAGE_lighttpd-mod-authn_gssapi
:krb5-libs
,20))
198 $(eval
$(call BuildPlugin
,authn_ldap
,LDAP-based authentication
,+PACKAGE_lighttpd-mod-authn_ldap
:libopenldap
,20))
199 $(eval
$(call BuildPlugin
,authn_mysql
,Mysql-based authentication
,+PACKAGE_lighttpd-mod-authn_mysql
:libmysqlclient
,20))
201 # Finally, everything else.
202 $(eval
$(call BuildPlugin
,access
,Access restrictions
,,30))
203 $(eval
$(call BuildPlugin
,accesslog
,Access logging
,,30))
204 $(eval
$(call BuildPlugin
,alias
,Directory alias
,,30))
205 $(eval
$(call BuildPlugin
,cgi
,CGI
,,30))
206 #$(eval $(call BuildPlugin,cml,Cache Meta Language,+PACKAGE_lighttpd-mod-cml:liblua +PACKAGE_lighttpd-mod-cml:libmemcached,30))
207 $(eval
$(call BuildPlugin
,cml
,Cache Meta Language
,+PACKAGE_lighttpd-mod-cml
:liblua
,30))
208 $(eval
$(call BuildPlugin
,compress
,Compress output
,+PACKAGE_lighttpd-mod-compress
:zlib
,30))
209 $(eval
$(call BuildPlugin
,deflate
,Compress dynamic output
,+PACKAGE_lighttpd-mod-deflate
:zlib
,30))
210 $(eval
$(call BuildPlugin
,evasive
,Evasive
,,30))
211 $(eval
$(call BuildPlugin
,evhost
,Enhanced Virtual-Hosting
,,30))
212 $(eval
$(call BuildPlugin
,expire
,Expire
,,30))
213 $(eval
$(call BuildPlugin
,extforward
,Extract client
,,30))
214 $(eval
$(call BuildPlugin
,fastcgi
,FastCGI
,,30))
215 $(eval
$(call BuildPlugin
,flv_streaming
,FLV streaming
,,30))
216 #$(eval $(call BuildPlugin,geoip,Geolocation,+PACKAGE_lighttpd-mod-geoip:libgeoip,30))
217 $(eval
$(call BuildPlugin
,magnet
,Magnet
,+PACKAGE_lighttpd-mod-magnet
:liblua
,30))
218 $(eval
$(call BuildPlugin
,mysql_vhost
,Mysql virtual hosting
,+PACKAGE_lighttpd-mod-mysql_vhost
:libmysqlclient
,30))
219 $(eval
$(call BuildPlugin
,proxy
,Proxy
,,30))
220 $(eval
$(call BuildPlugin
,rewrite
,URL rewriting
,+PACKAGE_lighttpd-mod-rewrite
:libpcre
,30))
221 $(eval
$(call BuildPlugin
,rrdtool
,RRDtool
,,30))
222 $(eval
$(call BuildPlugin
,scgi
,SCGI
,,30))
223 $(eval
$(call BuildPlugin
,secdownload
,Secure and fast download
,,30))
224 $(eval
$(call BuildPlugin
,setenv
,Environment variable setting
,,30))
225 $(eval
$(call BuildPlugin
,simple_vhost
,Simple virtual hosting
,,30))
226 $(eval
$(call BuildPlugin
,ssi
,SSI
,+PACKAGE_lighttpd-mod-ssi
:libpcre
,30))
227 $(eval
$(call BuildPlugin
,status
,Server status display
,,30))
228 #$(eval $(call BuildPlugin,trigger_b4_dl,Trigger before download,+PACKAGE_lighttpd-mod-trigger_b4_dl:libpcre +PACKAGE_lighttpd-mod-trigger_b4_dl:libgdbm +PACKAGE_lighttpd-mod-trigger_b4_dl:libmemcached,30))
229 $(eval
$(call BuildPlugin
,trigger_b4_dl
,Trigger before download
,+PACKAGE_lighttpd-mod-trigger_b4_dl
:libpcre
+PACKAGE_lighttpd-mod-trigger_b4_dl
:libgdbm
,30))
230 $(eval
$(call BuildPlugin
,userdir
,User directory
,,30))
231 $(eval
$(call BuildPlugin
,usertrack
,User tracking
,,30))
232 $(eval
$(call BuildPlugin
,webdav
,WebDAV
,+PACKAGE_lighttpd-mod-webdav
:libsqlite3
+PACKAGE_lighttpd-mod-webdav
:libuuid
+PACKAGE_lighttpd-mod-webdav
:libxml2
,30))