]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/apache/apache.mk
package/apache: bump to version 2.4.28
[coffee/buildroot.git] / package / apache / apache.mk
1 ################################################################################
2 #
3 # apache
4 #
5 ################################################################################
6
7 APACHE_VERSION = 2.4.28
8 APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
9 APACHE_SITE = http://archive.apache.org/dist/httpd
10 APACHE_LICENSE = Apache-2.0
11 APACHE_LICENSE_FILES = LICENSE
12 # Needed for mod_php
13 APACHE_INSTALL_STAGING = YES
14 # We have a patch touching configure.in and Makefile.in,
15 # so we need to autoreconf:
16 APACHE_AUTORECONF = YES
17 APACHE_DEPENDENCIES = apr apr-util pcre
18
19 APACHE_CONF_ENV= \
20         ap_cv_void_ptr_lt_long=no \
21         PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config
22
23 ifeq ($(BR2_PACKAGE_APACHE_MPM_EVENT),y)
24 APACHE_MPM = event
25 else ifeq ($(BR2_PACKAGE_APACHE_MPM_PREFORK),y)
26 APACHE_MPM = prefork
27 else ifeq ($(BR2_PACKAGE_APACHE_MPM_WORKER),y)
28 APACHE_MPM = worker
29 endif
30
31 APACHE_CONF_OPTS = \
32         --sysconfdir=/etc/apache2 \
33         --with-apr=$(STAGING_DIR)/usr \
34         --with-apr-util=$(STAGING_DIR)/usr \
35         --with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
36         --enable-http \
37         --enable-dbd \
38         --enable-proxy \
39         --enable-mime-magic \
40         --without-suexec-bin \
41         --enable-mods-shared=all \
42         --with-mpm=$(APACHE_MPM) \
43         --disable-lua \
44         --disable-luajit
45
46 ifeq ($(BR2_PACKAGE_LIBXML2),y)
47 APACHE_DEPENDENCIES += libxml2
48 # Apache wants the path to the header file, where it can find
49 # <libxml/parser.h>.
50 APACHE_CONF_OPTS += \
51         --enable-xml2enc \
52         --enable-proxy-html \
53         --with-libxml2=$(STAGING_DIR)/usr/include/libxml2
54 else
55 APACHE_CONF_OPTS += \
56         --disable-xml2enc \
57         --disable-proxy-html
58 endif
59
60 ifeq ($(BR2_PACKAGE_OPENSSL),y)
61 APACHE_DEPENDENCIES += openssl
62 APACHE_CONF_OPTS += \
63         --enable-ssl \
64         --with-ssl=$(STAGING_DIR)/usr
65 else
66 APACHE_CONF_OPTS += --disable-ssl
67 endif
68
69 ifeq ($(BR2_PACKAGE_ZLIB),y)
70 APACHE_DEPENDENCIES += zlib
71 APACHE_CONF_OPTS += \
72         --enable-deflate \
73         --with-z=$(STAGING_DIR)/usr
74 else
75 APACHE_CONF_OPTS += --disable-deflate
76 endif
77
78 define APACHE_FIX_STAGING_APACHE_CONFIG
79         $(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
80         $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
81 endef
82 APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
83
84 define APACHE_CLEANUP_TARGET
85         $(RM) -rf $(TARGET_DIR)/usr/manual $(TARGET_DIR)/usr/build
86 endef
87 APACHE_POST_INSTALL_TARGET_HOOKS += APACHE_CLEANUP_TARGET
88
89 $(eval $(autotools-package))