apache.mk 2.4 KB

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