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
:=http
://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 \
67 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
)
72 ifneq ($(strip $(CONFIG_LIGHTTPD_SSL
)),)
74 --with-openssl
="$(STAGING_DIR)/usr"
80 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-mysql-vhost
),)
88 ifneq ($(SDK
)$(CONFIG_PACKAGE_lighttpd-mod-webdav
),)
92 # XXX: needed by sqlite3 to prevent segfaults in mod_webdav.so
97 --without-webdav-locks \
98 --without-webdav-props
101 define Build
/Configure
102 $(call Build
/Configure
/Default
)
103 # XXX: override pcre (mis)detection by ./configure when cross-compiling
104 echo
"#define HAVE_LIBPCRE 1" >>$(PKG_BUILD_DIR
)/config.h
105 echo
"#define HAVE_PCRE_H 1" >>$(PKG_BUILD_DIR
)/config.h
108 define Package
/lighttpd
/conffiles
109 /etc
/lighttpd
/lighttpd.conf
112 define Package
/lighttpd
/install
113 $(INSTALL_DIR
) $(1)/etc
/lighttpd
114 $(INSTALL_DATA
) .
/files
/lighttpd.conf
$(1)/etc
/lighttpd
/
115 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/doc
/config
/conf.d
/mime.conf
$(1)/etc
/lighttpd
/
116 $(INSTALL_DIR
) $(1)/etc
/lighttpd
/conf.d
117 $(INSTALL_DIR
) $(1)/etc
/init.d
118 $(INSTALL_BIN
) .
/files
/lighttpd.init
$(1)/etc
/init.d
/lighttpd
119 $(INSTALL_DIR
) $(1)/usr
/lib
/lighttpd
120 for m in dirlisting indexfile staticfile
; do \
121 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$$$${m}.so
$(1)/usr
/lib
/lighttpd
/ ; \
123 $(INSTALL_DIR
) $(1)/usr
/sbin
124 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/lighttpd
$(1)/usr
/sbin
/
128 define Package
/lighttpd-mod-
$(1)
129 $(call Package
/lighttpd
/Default
)
137 define Package
/lighttpd-mod-
$(1)/install
138 $(INSTALL_DIR
) $$(1)/usr
/lib
/lighttpd
139 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lighttpd
/mod_
$(1).so
$$(1)/usr
/lib
/lighttpd
140 $(INSTALL_DIR
) $$(1)/etc
/lighttpd
/conf.d
141 if
[ -f
$(PKG_BUILD_DIR
)/doc
/config
/conf.d
/$(1).conf
]; then \
142 $(CP
) $(PKG_BUILD_DIR
)/doc
/config
/conf.d
/$(1).conf
$$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; \
144 echo
'server.modules += ( "mod_$(1)" )' > $$(1)/etc
/lighttpd
/conf.d
/$(4)-$(1).conf
; \
148 $$(eval
$$(call BuildPackage
,lighttpd-mod-
$(1)))
151 $(eval
$(call BuildPackage
,lighttpd
))
153 # First, permit redirect from HTTP to HTTPS.
154 $(eval
$(call BuildPlugin
,redirect
,URL redirection
,+PACKAGE_lighttpd-mod-redirect
:libpcre
,10))
156 # Next, permit authentication.
157 $(eval
$(call BuildPlugin
,auth
,Authentication
,,20))
158 $(eval
$(call BuildPlugin
,authn_file
,File-based authentication
,,20))
160 # Finally, everything else.
161 $(eval
$(call BuildPlugin
,access
,Access restrictions
,,30))
162 $(eval
$(call BuildPlugin
,accesslog
,Access logging
,,30))
163 $(eval
$(call BuildPlugin
,alias
,Directory alias
,,30))
164 $(eval
$(call BuildPlugin
,cgi
,CGI
,,30))
165 $(eval
$(call BuildPlugin
,cml
,Cache Meta Language
,+liblua
,30))
166 $(eval
$(call BuildPlugin
,compress
,Compress output
,+PACKAGE_lighttpd-mod-compress
:zlib
,30))
167 $(eval
$(call BuildPlugin
,evasive
,Evasive
,,30))
168 $(eval
$(call BuildPlugin
,evhost
,Exnhanced Virtual-Hosting
,,30))
169 $(eval
$(call BuildPlugin
,expire
,Expire
,,30))
170 $(eval
$(call BuildPlugin
,extforward
,Extract client
,,30))
171 $(eval
$(call BuildPlugin
,fastcgi
,FastCGI
,,30))
172 $(eval
$(call BuildPlugin
,flv_streaming
,FLV streaming
,,30))
173 $(eval
$(call BuildPlugin
,magnet
,Magnet
,+liblua
,30))
174 $(eval
$(call BuildPlugin
,mysql_vhost
,Mysql virtual hosting
,+PACKAGE_lighttpd-mod-mysql_vhost
:libmysqlclient
,30))
175 $(eval
$(call BuildPlugin
,proxy
,Proxy
,,30))
176 $(eval
$(call BuildPlugin
,rewrite
,URL rewriting
,+PACKAGE_lighttpd-mod-rewrite
:libpcre
,30))
177 $(eval
$(call BuildPlugin
,rrdtool
,RRDtool
,,30))
178 $(eval
$(call BuildPlugin
,scgi
,SCGI
,,30))
179 $(eval
$(call BuildPlugin
,secdownload
,Secure and fast download
,,30))
180 $(eval
$(call BuildPlugin
,setenv
,Environment variable setting
,,30))
181 $(eval
$(call BuildPlugin
,simple_vhost
,Simple virtual hosting
,,30))
182 $(eval
$(call BuildPlugin
,ssi
,SSI
,+libpcre
,30))
183 $(eval
$(call BuildPlugin
,status
,Server status display
,,30))
184 $(eval
$(call BuildPlugin
,trigger_b4_dl
,Trigger before download
,+PACKAGE_lighttpd-mod-trigger_b4_dl
:libpcre
,30))
185 $(eval
$(call BuildPlugin
,userdir
,User directory
,,30))
186 $(eval
$(call BuildPlugin
,usertrack
,User tracking
,,30))
187 $(eval
$(call BuildPlugin
,webdav
,WebDAV
,+PACKAGE_lighttpd-mod-webdav
:libsqlite3
+PACKAGE_lighttpd-mod-webdav
:libuuid
+PACKAGE_lighttpd-mod-webdav
:libxml2
,30))