2 # Copyright (C) 2007-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
13 PKG_SOURCE_NAME
:=httpd
15 PKG_SOURCE
:=$(PKG_SOURCE_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=@APACHE
/httpd
/
17 PKG_HASH
:=0127f7dc497e9983e9c51474bed75e45607f2f870a7675a86dc90af6d572f5c9
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_NAME
)-$(PKG_VERSION
)
21 PKG_MAINTAINER
:=Thomas Heil
<heil@terminal-consulting.de
>
22 PKG_LICENSE
:=Apache-2.0
23 PKG_LICENSE_FILES
:=LICENSE
25 PKG_CPE_ID
:=cpe
:/a
:apache
:http_server
27 PKG_BUILD_DEPENDS
:=openssl
31 PKG_CONFIG_DEPENDS
:= \
32 CONFIG_PACKAGE_apache-mod-deflate \
33 CONFIG_PACKAGE_apache-mod-http2 \
34 CONFIG_PACKAGE_apache-mod-ldap \
35 CONFIG_PACKAGE_apache-mod-lua \
36 CONFIG_PACKAGE_apache-mod-md \
37 CONFIG_PACKAGE_apache-mod-proxy \
38 CONFIG_PACKAGE_apache-mod-proxy-html \
39 CONFIG_PACKAGE_apache-mod-session-crypto \
40 CONFIG_PACKAGE_apache-mod-suexec \
41 CONFIG_PACKAGE_apache-mod-webdav \
42 CONFIG_PACKAGE_apache-suexec
48 include $(INCLUDE_DIR
)/package.mk
49 # without nls.mk mod_xml2enc might not find the iconv headers
50 include $(INCLUDE_DIR
)/nls.mk
52 define Package
/apache
/Default
55 SUBMENU
:=Web Servers
/Proxies
56 TITLE
:=The Apache Web Server
57 URL
:=https
://httpd.apache.org
/
60 define Package
/apache
/Default
/description
61 The Apache HTTP Server Project is a collaborative software development
62 effort aimed at creating a robust
, commercial-grade
, featureful
, and
63 freely-available source code implementation of an HTTP
(Web
) server.
67 $(call Package
/apache
/Default
)
68 USERID
:=apache
=377:apache
=377
69 DEPENDS
:=+libapr
+libaprutil
+libpcre
72 define Package
/apache
/description
73 $(call Package
/apache
/Default
/description
)
75 This package contains the Apache web server and utility programs.
79 define Package
/apache
/conffiles
80 /etc
/apache2
/apache2.conf
81 /etc
/apache2
/extra
/httpd-autoindex.conf
82 /etc
/apache2
/extra
/httpd-dav.conf
83 /etc
/apache2
/extra
/httpd-default.conf
84 /etc
/apache2
/extra
/httpd-info.conf
85 /etc
/apache2
/extra
/httpd-languages.conf
86 /etc
/apache2
/extra
/httpd-manual.conf
87 /etc
/apache2
/extra
/httpd-mpm.conf
88 /etc
/apache2
/extra
/httpd-multilang-errordoc.conf
89 /etc
/apache2
/extra
/httpd-ssl.conf
90 /etc
/apache2
/extra
/httpd-userdir.conf
91 /etc
/apache2
/extra
/httpd-vhosts.conf
92 /etc
/apache2
/extra
/proxy-html.conf
94 /etc
/apache2
/mime.types
98 define Package
/apache-ab
99 $(call Package
/apache
/Default
)
100 TITLE
:=Apache benchmark utility
101 DEPENDS
:=apache
+libopenssl
104 define Package
/apache-ab
/description
105 $(call Package
/apache
/Default
/description
)
107 Apache server benchmarking utility.
111 define Package
/apache-error
112 $(call Package
/apache
/Default
)
113 TITLE
:=Error documents
117 define Package
/apache-error
/description
118 $(call Package
/apache
/Default
/description
)
120 Apache multi language custom error documents.
124 define Package
/apache-icons
125 $(call Package
/apache
/Default
)
126 TITLE
:=Icons from Apache
130 define Package
/apache-icons
/description
131 $(call Package
/apache
/Default
/description
)
133 This package contains the icons from Apache.
137 define Package
/apache-suexec
138 $(call Package
/apache
/Default
)
141 # Directory "/usr/lib/apache2/suexec_dir" is installed with mode 0750
142 # and is only accessible by root and the group apache. This way apache
143 # can access the SUID binary "suexec" contained within while others
145 FILE_MODES
:=/usr
/lib
/apache2
/suexec_dir
:root
:apache
:0750
148 define Package
/apache-suexec
/description
149 $(call Package
/apache
/Default
/description
)
151 This package contains the suEXEC utility from Apache.
155 define Package
/apache-utils
156 $(call Package
/apache
/Default
)
157 TITLE
:=Apache utilities
161 define Package
/apache-utils
/description
162 $(call Package
/apache
/Default
/description
)
164 Apache utility programs for webservers.
168 define Package
/apache
/install/mod
169 $(INSTALL_DIR
) $(1)/usr
/lib
/apache2
171 $(PKG_INSTALL_DIR
)/usr
/lib
/apache2
/mod_
$(2).so \
176 --$(if
$(CONFIG_PACKAGE_apache-mod-http2
),en
,dis
)able-http2 \
177 --$(if
$(CONFIG_PACKAGE_apache-mod-lua
),en
,dis
)able-lua \
178 --$(if
$(CONFIG_PACKAGE_apache-mod-md
),en
,dis
)able-md \
179 --$(if
$(CONFIG_PACKAGE_apache-mod-proxy
),en
,dis
)able-proxy \
180 --$(if
$(CONFIG_PACKAGE_apache-mod-session-crypto
),en
,dis
)able-session-crypto \
181 --$(if
$(CONFIG_PACKAGE_apache-mod-ssl
),en
,dis
)able-ssl \
182 --datadir=/usr
/share
/apache2 \
185 --enable-authn-alias \
186 --enable-authn-anon \
191 --enable-disk-cache \
192 --enable-exception-hook \
193 --enable-file-cache \
194 --enable-layout
=OpenWrt \
196 --enable-mods-shared
=all \
197 --enable-mpms-shared
=all \
199 --libexecdir
=/usr
/lib
/apache2 \
200 --sysconfdir
=/etc
/apache2 \
201 --with-apr-util
="$(STAGING_DIR)/usr/bin/apu-1-config" \
202 --with-apr
="$(STAGING_DIR)/usr/bin/apr-1-config" \
204 --with-pcre
="$(STAGING_DIR)/usr/bin/pcre-config" \
205 --with-program-name
=apache2 \
208 ifneq ($(CONFIG_PACKAGE_apache-mod-deflate
),)
211 --with-z
="$(STAGING_DIR)/usr"
218 ifneq ($(CONFIG_PACKAGE_apache-mod-ldap
),)
220 --enable-authnz-ldap \
224 --disable-authnz-ldap \
228 ifneq ($(CONFIG_PACKAGE_apache-mod-proxy
),)
231 --enable-proxy-connect \
239 ifneq ($(CONFIG_PACKAGE_apache-mod-proxy-html
),)
241 --enable-proxy-html \
243 --with-libxml2
="$(STAGING_DIR)/usr"
246 --disable-proxy-html \
250 ifneq ($(CONFIG_PACKAGE_apache-mod-suexec
)$(CONFIG_PACKAGE_apache-suexec
),)
253 --with-suexec-bin
=/usr
/lib
/apache2
/suexec_dir
/suexec \
254 --with-suexec-caller
=apache \
255 --with-suexec-logfile
=/var
/log
/apache2
/suexec.log
261 ifneq ($(CONFIG_PACKAGE_apache-mod-webdav
),)
273 ap_cv_void_ptr_lt_long
=no
275 define Build
/InstallDev
276 $(INSTALL_DIR
) $(1)/usr
/bin
277 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/apxs
$(1)/usr
/bin
278 $(INSTALL_DIR
) $(1)/usr
/include/apache2
279 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/apache2
/* \
280 $(1)/usr
/include/apache2
281 $(INSTALL_DIR
) $(1)/usr
/lib
/apache2
282 $(INSTALL_DIR
) $(1)/usr
/share
/apache2
/build
283 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/apache2
/build
/* \
284 $(1)/usr
/share
/apache2
/build
285 $(SED
) 's%"/usr/bin"%"$(STAGING_DIR)/usr/bin"%' $(1)/usr
/bin
/apxs
286 $(SED
) 's%/usr/share/apache2/build%$(STAGING_DIR)/usr/share/apache2/build%' \
288 $(SED
) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' \
289 $(1)/usr
/share
/apache2
/build
/config_vars.mk
292 define Package
/apache
/install
293 $(INSTALL_DIR
) $(1)/etc
/apache2
/extra
294 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/apache2
/extra
/* \
295 $(1)/etc
/apache2
/extra
296 $(SED
) '/^LoadModule session_crypto_module/s/^/#/' \
297 $(PKG_INSTALL_DIR
)/etc
/apache2
/apache2.conf
299 $(PKG_INSTALL_DIR
)/etc
/apache2
/{apache2.conf
,magic
,mime.types
} \
301 $(INSTALL_DIR
) $(1)/etc
/init.d
302 $(INSTALL_BIN
) .
/files
/apache2.init
$(1)/etc
/init.d
/apache2
303 $(INSTALL_DIR
) $(1)/usr
/lib
/apache2
304 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/apache2
/*.so \
306 rm -f
$(1)/usr
/lib
/apache2
/mod_
{*ldap
,dav
*,deflate
,http2
,lbmethod_
*,lua
,md
,proxy
*,proxy_html
,session_crypto
,ssl
,suexec
,xml2enc
}.so
307 $(INSTALL_DIR
) $(1)/usr
/share
/apache2
/{cgi-bin
,htdocs
}
308 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/apache2
/cgi-bin
/* \
309 $(1)/usr
/share
/apache2
/cgi-bin
310 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/apache2
/htdocs
/* \
311 $(1)/usr
/share
/apache2
/htdocs
312 $(INSTALL_DIR
) $(1)/usr
/{,s
}bin
314 $(PKG_INSTALL_DIR
)/usr
/bin
/{dbmmanage
,htdbm
,htdigest
,htpasswd
,httxt2dbm
,logresolve
} \
316 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/{apachectl
,apache2
} \
320 define Package
/apache-ab
/install
321 $(INSTALL_DIR
) $(1)/usr
/bin
322 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ab
$(1)/usr
/bin
325 define Package
/apache-error
/install
326 $(INSTALL_DIR
) $(1)/usr
/share
/apache2
/error
327 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/apache2
/error
/* \
328 $(1)/usr
/share
/apache2
/error
331 define Package
/apache-icons
/install
332 $(INSTALL_DIR
) $(1)/usr
/share
/apache2
333 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/apache2
/icons \
334 $(1)/usr
/share
/apache2
337 define Package
/apache-suexec
/install
338 $(INSTALL_DIR
) $(1)/usr
/lib
/apache2
/suexec_dir
339 $(INSTALL_SUID
) $(PKG_INSTALL_DIR
)/usr
/sbin
/suexec \
340 $(1)/usr
/lib
/apache2
/suexec_dir
343 define Package
/apache-utils
/install
344 $(INSTALL_DIR
) $(1)/usr
/sbin
346 $(PKG_INSTALL_DIR
)/usr
/sbin
/{checkgid
,envvars
*,htcacheclean
,rotatelogs
} \
350 define Package
/apache
/Module
351 define Package
/apache-mod-
$(1)
352 $(call Package
/apache
/Default
)
354 DEPENDS
:=apache
$(patsubst +%,+PACKAGE_apache-mod-
$(1):%,$(4))
356 define Package
/apache-mod-
$(1)/description
357 $(subst \n,$(newline
),$(3))
359 define Package
/apache-mod-
$(1)/install
360 $(foreach m
,$(5),$(call Package
/apache
/install/mod
,$$(1),$(m
));)
362 $$(eval
$$(call BuildPackage
,apache-mod-
$(1)))
365 $(eval
$(call BuildPackage
,apache
))
366 $(eval
$(call BuildPackage
,apache-ab
))
367 $(eval
$(call BuildPackage
,apache-error
))
368 $(eval
$(call BuildPackage
,apache-icons
))
369 $(eval
$(call BuildPackage
,apache-suexec
))
370 $(eval
$(call BuildPackage
,apache-utils
))
371 $(eval
$(call Package
/apache
/Module
,deflate
,Deflate
,Deflate support for the Apache HTTP server.
,+zlib
,deflate
))
372 $(eval
$(call Package
/apache
/Module
,http2
,HTTP2
,HTTP
/2 transport layer for the Apache HTTP Server.
,+libnghttp2
+libopenssl
,http2
))
373 $(eval
$(call Package
/apache
/Module
,ldap
,LDAP
,LDAP authentication
/authorization module for the Apache HTTP Server.
,+libaprutil-ldap
,authnz_ldap ldap
))
374 $(eval
$(call Package
/apache
/Module
,lua
,Lua
,Lua support for the Apache HTTP server.
,+liblua
,lua
))
375 $(eval
$(call Package
/apache
/Module
,md
,Managed Domain handling
,Managed Domain handling.
,+libcurl
+jansson
+libopenssl
,md
))
376 $(eval
$(call Package
/apache
/Module
,proxy
,Proxy
,Proxy modules for the Apache HTTP Server.
,,proxy proxy_ajp proxy_balancer proxy_connect proxy_express proxy_fcgi proxy_fdpass proxy_ftp proxy_hcheck proxy_http proxy_scgi proxy_uwsgi proxy_wstunnel lbmethod_byrequests lbmethod_heartbeat lbmethod_bytraffic lbmethod_bybusyness
))
377 $(eval
$(call Package
/apache
/Module
,proxy-html
,Proxy HTML
,HTML and XML content filters for the Apache HTTP Server.
,+apache-mod-proxy
+libxml2
,proxy_html xml2enc
))
378 $(eval
$(call Package
/apache
/Module
,session-crypto
,Session crypto
,Session encryption support for the Apache HTTP Server.
,+libaprutil-crypto-openssl
,session_crypto
))
379 $(eval
$(call Package
/apache
/Module
,ssl
,SSL
/TLS
,SSL
/TLS module for the Apache HTTP Server.
,+libopenssl
,ssl
))
380 $(eval
$(call Package
/apache
/Module
,suexec
,suEXEC
,suEXEC module for the Apache HTTP Server.
,+apache-suexec
,suexec
))
381 $(eval
$(call Package
/apache
/Module
,webdav
,WebDAV
,WebDAV support for the Apache HTTP Server.
,,dav dav_fs dav_lock
))