2 # Copyright (C) 2006-2018 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
13 # release candidate ~rcX testing; remove for release
14 #PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.4.56
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
17 PKG_SOURCE_URL
:=https
://download.lighttpd.net
/lighttpd
/releases-1.4.x
18 PKG_HASH
:=e4ce84cd79e8ae8ba193c7a7cc79c4afba9a076b443ef9f8d4bcd13a3354df77
20 PKG_MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
21 PKG_LICENSE
:=BSD-3-Clause
22 PKG_LICENSE_FILES
:=COPYING
23 PKG_CPE_ID
:=cpe
:/a
:lighttpd
:lighttpd
26 PKG_BUILD_DEPENDS
:=meson
/host
27 PKG_CONFIG_DEPENDS
:=CONFIG_LIGHTTPD_SSL
$(patsubst %,CONFIG_PACKAGE_lighttpd-mod-
%,$(REBUILD_MODULES
))
29 REBUILD_MODULES
=authn_gssapi authn_ldap authn_mysql cml magnet mysql_vhost trigger_b4_dl webdav
31 include $(INCLUDE_DIR
)/package.mk
32 include ..
/..
/devel
/meson
/meson.mk
34 define Package
/lighttpd
/Default
37 SUBMENU
:=Web Servers
/Proxies
38 URL
:=https
://www.lighttpd.net
/
41 define Package
/lighttpd
42 $(call Package
/lighttpd
/Default
)
44 DEPENDS
:=+libnettle
+libpcre
+libpthread
+LIGHTTPD_LOGROTATE
:logrotate
45 TITLE
:=A flexible and lightweight web server
48 define Package
/lighttpd
/config
51 depends on PACKAGE_lighttpd
54 Implements SSL support in lighttpd
(using libopenssl
). This
55 option is enabled by default for backwards compatibility.
56 Select one TLS module below if you enable the SSL engine in
57 your lighttpd configuration file.
58 (mod_gnutls
, mod_mbedtls
, mod_nss
, mod_openssl
, mod_wolfssl
)
60 config LIGHTTPD_LOGROTATE
61 bool
"Logrotate support"
62 depends on PACKAGE_lighttpd
65 It adds support for logrotate functionality.
68 ifneq ($(strip $(CONFIG_LIGHTTPD_SSL
)),)
69 ifeq ($(CONFIG_PACKAGE_lighttpd-mod-openssl
),)
70 ifeq ($(CONFIG_PACKAGE_lighttpd-mod-mbedtls
),)
71 ifeq ($(CONFIG_PACKAGE_lighttpd-mod-wolfssl
),)
72 ifeq ($(CONFIG_PACKAGE_lighttpd-mod-gnutls
),)
73 ifeq ($(CONFIG_PACKAGE_lighttpd-mod-nss
),)
74 CONFIG_PACKAGE_lighttpd-mod-openssl
=m
82 ifneq ($(CONFIG_PACKAGE_lighttpd-mod-auth
),)
83 ifeq ($(CONFIG_PACKAGE_lighttpd-mod-authn_file
),)
84 CONFIG_PACKAGE_lighttpd-mod-authn_file
=m
91 -Dwith_dbi
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-authn_dbi
)$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_dbi
),true
,false
) \
93 -Dwith_gdbm
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-trigger_b4_dl
),true
,false
) \
95 -Dwith_gnutls
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-gnutls
),true
,false
) \
96 -Dwith_krb5
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-authn_gssapi
),true
,false
) \
97 -Dwith_ldap
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-authn_ldap
)$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_ldap
),true
,false
) \
99 -Dwith_libunwind
=false \
100 -Dwith_lua
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-cml
)$(CONFIG_PACKAGE_lighttpd-mod-magnet
),true
,false
) \
101 -Dwith_maxminddb
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-maxminddb
),true
,false
) \
102 -Dwith_mbedtls
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-mbedtls
),true
,false
) \
103 -Dwith_memcached
=false \
104 -Dwith_mysql
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-authn_mysql
)$(CONFIG_PACKAGE_lighttpd-mod-mysql_vhost
)$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_mysql
),true
,false
) \
106 -Dwith_nss
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-nss
),true
,false
) \
107 -Dwith_openssl
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-openssl
),true
,false
) \
108 -Dwith_pam
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-authn_pam
),true
,false
) \
110 -Dwith_pgsql
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_pgsql
),true
,false
) \
111 -Dwith_sasl
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-authn_sasl
),true
,false
) \
112 -Dwith_webdav_locks
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-webdav
),true
,false
) \
113 -Dwith_webdav_props
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-webdav
),true
,false
) \
114 -Dwith_wolfssl
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-wolfssl
),true
,false
) \
116 -Dwith_zlib
=$(if
$(CONFIG_PACKAGE_lighttpd-mod-deflate
),true
,false
)
118 BASE_MODULES
:=dirlisting indexfile staticfile
120 define Package
/lighttpd
/conffiles
121 /etc
/lighttpd
/lighttpd.conf
124 define Package
/lighttpd
/install
125 $(INSTALL_DIR
) $(1)/etc
/lighttpd
126 $(INSTALL_DATA
) .
/files
/lighttpd.conf
$(1)/etc
/lighttpd
/
127 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/doc
/config
/conf.d
/mime.conf
$(1)/etc
/lighttpd
/
128 $(INSTALL_DIR
) $(1)/etc
/lighttpd
/conf.d
129 $(INSTALL_DIR
) $(1)/etc
/init.d
130 $(INSTALL_BIN
) .
/files
/lighttpd.init
$(1)/etc
/init.d
/lighttpd
131 $(INSTALL_DIR
) $(1)/usr
/lib
/lighttpd
132 for m in
$(BASE_MODULES
); do \
133 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$$$${m}.so
$(1)/usr
/lib
/lighttpd
/ ; \
135 $(INSTALL_DIR
) $(1)/usr
/sbin
136 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/lighttpd
$(1)/usr
/sbin
/
138 ifneq ($(strip $(CONFIG_LIGHTTPD_LOGROTATE
)),)
139 $(INSTALL_DIR
) $(1)/etc
/logrotate.d
140 $(CP
) .
/files
/lighttpd.logrotate
$(1)/etc
/logrotate.d
/lighttpd.conf
145 define Package
/lighttpd-mod-
$(1)
146 $(call Package
/lighttpd
/Default
)
154 define Package
/lighttpd-mod-
$(1)/conffiles
155 /etc
/lighttpd
/conf.d
/$(4)-$(1).conf
158 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-
$(1)),)
159 define Package
/lighttpd-mod-
$(1)/install
160 $(INSTALL_DIR
) $$(1)/usr
/lib
/lighttpd
161 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$(1).so
$$(1)/usr
/lib
/lighttpd
162 $(INSTALL_DIR
) $$(1)/etc
/lighttpd
/conf.d
163 if
[ -f
$(PKG_BUILD_DIR
)/doc
/config
/conf.d
/$(1).conf
]; then \
164 $(CP
) $(PKG_BUILD_DIR
)/doc
/config
/conf.d
/$(1).conf
$$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; \
165 if
! grep
-qF
'mod_$(1)' $$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; then \
166 sed
-i
"`sed '/^##/ !q' $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf | wc -l` i\
167 server.modules += ( \"mod_$(1)\" )" $$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; \
170 echo
'server.modules += ( "mod_$(1)" )' > $$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; \
175 $$(eval
$$(call BuildPackage
,lighttpd-mod-
$(1)))
178 $(eval
$(call BuildPackage
,lighttpd
))
180 # First, permit redirect from HTTP to HTTPS.
181 $(eval
$(call BuildPlugin
,redirect
,URL redirection
,+PACKAGE_lighttpd-mod-redirect
:libpcre
,10))
183 # Next, permit authentication.
184 $(eval
$(call BuildPlugin
,auth
,Authentication
,+PACKAGE_lighttpd-mod-auth
:libnettle
,20))
185 $(eval
$(call BuildPlugin
,authn_dbi
,DBI-based authentication
,lighttpd-mod-auth
+PACKAGE_lighttpd-mod-authn_dbi
:libnettle
+PACKAGE_lighttpd-mod-authn_dbi
:libdbi
,20))
186 $(eval
$(call BuildPlugin
,authn_file
,File-based authentication
,lighttpd-mod-auth
+PACKAGE_lighttpd-mod-authn_file
:libnettle
,20))
187 $(eval
$(call BuildPlugin
,authn_gssapi
,Kerberos-based authentication
,lighttpd-mod-auth
+PACKAGE_lighttpd-mod-authn_gssapi
:krb5-libs
,20))
188 $(eval
$(call BuildPlugin
,authn_ldap
,LDAP-based authentication
,lighttpd-mod-auth
+PACKAGE_lighttpd-mod-authn_ldap
:libopenldap
,20))
189 $(eval
$(call BuildPlugin
,authn_mysql
,Mysql-based authentication
,lighttpd-mod-auth
+PACKAGE_lighttpd-mod-authn_mysql
:libnettle
+PACKAGE_lighttpd-mod-authn_mysql
:libmariadb
,20))
190 $(eval
$(call BuildPlugin
,authn_pam
,PAM-based authentication
,lighttpd-mod-auth
+PACKAGE_lighttpd-mod-authn_pam
:libpam
,20))
191 $(eval
$(call BuildPlugin
,authn_sasl
,SASL-based authentication
,lighttpd-mod-auth
+PACKAGE_lighttpd-mod-authn_sasl
:libsasl2
,20))
193 # Finally, everything else.
194 $(eval
$(call BuildPlugin
,access
,Access restrictions
,,30))
195 $(eval
$(call BuildPlugin
,accesslog
,Access logging
,,30))
196 $(eval
$(call BuildPlugin
,alias
,Directory alias
,,30))
197 $(eval
$(call BuildPlugin
,cgi
,CGI
,,30))
198 $(eval
$(call BuildPlugin
,cml
,Cache Meta Language
,+PACKAGE_lighttpd-mod-cml
:liblua
+PACKAGE_lighttpd-mod-cml
:libnettle
,30))
199 $(eval
$(call BuildPlugin
,deflate
,Compress dynamic output
,+PACKAGE_lighttpd-mod-deflate
:zlib
,30))
200 $(eval
$(call BuildPlugin
,evasive
,Evasive
,,30))
201 $(eval
$(call BuildPlugin
,evhost
,Enhanced Virtual-Hosting
,,30))
202 $(eval
$(call BuildPlugin
,expire
,Expire
,,30))
203 $(eval
$(call BuildPlugin
,extforward
,Extract client
,,30))
204 $(eval
$(call BuildPlugin
,fastcgi
,FastCGI
,,30))
205 $(eval
$(call BuildPlugin
,flv_streaming
,FLV streaming
,,30))
206 $(eval
$(call BuildPlugin
,gnutls
,TLS using gnutls
,@LIGHTTPD_SSL
+PACKAGE_lighttpd-mod-gnutls
:libgnutls
,30))
207 $(eval
$(call BuildPlugin
,magnet
,Magnet
,+PACKAGE_lighttpd-mod-magnet
:liblua
,30))
208 $(eval
$(call BuildPlugin
,maxminddb
,MaxMind DB
,+PACKAGE_lighttpd-mod-maxminddb
:libmaxminddb
,30))
209 $(eval
$(call BuildPlugin
,mbedtls
,TLS using mbedtls
,@LIGHTTPD_SSL
+PACKAGE_lighttpd-mod-mbedtls
:libmbedtls
,30))
210 $(eval
$(call BuildPlugin
,nss
,TLS using nss
,@LIGHTTPD_SSL
+PACKAGE_lighttpd-mod-nss
:libnss
,30))
211 $(eval
$(call BuildPlugin
,openssl
,TLS using openssl
,@LIGHTTPD_SSL
+PACKAGE_lighttpd-mod-openssl
:libopenssl
,30))
212 $(eval
$(call BuildPlugin
,proxy
,Proxy
,,30))
213 $(eval
$(call BuildPlugin
,rewrite
,URL rewriting
,+PACKAGE_lighttpd-mod-rewrite
:libpcre
,30))
214 $(eval
$(call BuildPlugin
,rrdtool
,RRDtool
,,30))
215 $(eval
$(call BuildPlugin
,scgi
,SCGI
,,30))
216 $(eval
$(call BuildPlugin
,secdownload
,Secure and fast download
,+PACKAGE_lighttpd-mod-secdownload
:libnettle
,30))
217 $(eval
$(call BuildPlugin
,setenv
,Environment variable setting
,,30))
218 $(eval
$(call BuildPlugin
,simple_vhost
,Simple virtual hosting
,,30))
219 $(eval
$(call BuildPlugin
,sockproxy
,sockproxy
,,30))
220 $(eval
$(call BuildPlugin
,ssi
,SSI
,+PACKAGE_lighttpd-mod-ssi
:libpcre
,30))
221 $(eval
$(call BuildPlugin
,staticfile
,staticfile
,,30))
222 $(eval
$(call BuildPlugin
,status
,Server status display
,,30))
223 $(eval
$(call BuildPlugin
,trigger_b4_dl
,Trigger before download
,+PACKAGE_lighttpd-mod-trigger_b4_dl
:libpcre
+PACKAGE_lighttpd-mod-trigger_b4_dl
:libgdbm
,30))
224 $(eval
$(call BuildPlugin
,uploadprogress
,Upload Progress
,,30))
225 $(eval
$(call BuildPlugin
,userdir
,User directory
,,30))
226 $(eval
$(call BuildPlugin
,usertrack
,User tracking
,+PACKAGE_lighttpd-mod-usertrack
:libnettle
,30))
227 $(eval
$(call BuildPlugin
,vhostdb
,Virtual Host Database
,,30))
228 $(eval
$(call BuildPlugin
,vhostdb_dbi
,Virtual Host Database
(DBI
),lighttpd-mod-vhostdb
+PACKAGE_lighttpd-mod-vhostdb_dbi
:libdbi
,30))
229 $(eval
$(call BuildPlugin
,vhostdb_ldap
,Virtual Host Database
(LDAP
),lighttpd-mod-vhostdb
+PACKAGE_lighttpd-mod-vhostdb_ldap
:libopenldap
,30))
230 $(eval
$(call BuildPlugin
,vhostdb_mysql
,Virtual Host Database
(MariaDB
),lighttpd-mod-vhostdb
+PACKAGE_lighttpd-mod-vhostdb_mysql
:libmariadb
,30))
231 $(eval
$(call BuildPlugin
,vhostdb_pgsql
,Virtual Host Database
(PostgreSQL
),lighttpd-mod-vhostdb
+PACKAGE_lighttpd-mod-vhostdb_pgsql
:libpq
,30))
232 $(eval
$(call BuildPlugin
,mysql_vhost
,Mysql virtual hosting
,lighttpd-mod-vhostdb
+PACKAGE_lighttpd-mod-mysql_vhost
:libmariadb
,30))
233 $(eval
$(call BuildPlugin
,webdav
,WebDAV
,+PACKAGE_lighttpd-mod-webdav
:libsqlite3
+PACKAGE_lighttpd-mod-webdav
:libuuid
+PACKAGE_lighttpd-mod-webdav
:libxml2
,30))
234 $(eval
$(call BuildPlugin
,wolfssl
,TLS using wolfssl
,@LIGHTTPD_SSL
+PACKAGE_lighttpd-mod-wolfssl
:libwolfssl
,30))
235 $(eval
$(call BuildPlugin
,wstunnel
,Websocket tunneling
,+PACKAGE_lighttpd-mod-wstunnel
:libnettle
,30))