dovecot.mk 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ################################################################################
  2. #
  3. # dovecot
  4. #
  5. ################################################################################
  6. DOVECOT_VERSION_MAJOR = 2.3
  7. DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).11.3
  8. DOVECOT_SITE = https://dovecot.org/releases/$(DOVECOT_VERSION_MAJOR)
  9. DOVECOT_INSTALL_STAGING = YES
  10. DOVECOT_LICENSE = LGPL-2.1, MIT, Public Domain, BSD-3-Clause, Unicode-DFS-2015
  11. DOVECOT_LICENSE_FILES = COPYING COPYING.LGPL COPYING.MIT
  12. DOVECOT_DEPENDENCIES = \
  13. host-pkgconf \
  14. $(if $(BR2_PACKAGE_LIBICONV),libiconv) \
  15. openssl
  16. # add host-gettext for AM_ICONV macro
  17. DOVECOT_DEPENDENCIES += host-gettext
  18. DOVECOT_CONF_ENV = \
  19. RPCGEN=__disable_RPCGEN_rquota \
  20. i_cv_epoll_works=yes \
  21. i_cv_inotify_works=yes \
  22. i_cv_posix_fallocate_works=no \
  23. i_cv_signed_size_t=no \
  24. i_cv_gmtime_max_time_t=32 \
  25. i_cv_signed_time_t=yes \
  26. i_cv_mmap_plays_with_write=yes \
  27. i_cv_fd_passing=yes \
  28. i_cv_c99_vsnprintf=yes \
  29. lib_cv_va_copy=yes \
  30. lib_cv___va_copy=yes \
  31. lib_cv_va_val_copy=yes
  32. DOVECOT_CONF_OPTS = --without-docs --with-ssl=openssl
  33. ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL)$(BR2_PACKAGE_DOVECOT_SQLITE),)
  34. DOVECOT_CONF_OPTS += --without-sql
  35. endif
  36. ifeq ($(BR2_PACKAGE_BZIP2),y)
  37. DOVECOT_CONF_OPTS += --with-bzlib
  38. DOVECOT_DEPENDENCIES += bzip2
  39. else
  40. DOVECOT_CONF_OPTS += --without-bzlib
  41. endif
  42. ifeq ($(BR2_PACKAGE_ICU),y)
  43. DOVECOT_CONF_OPTS += --with-icu
  44. DOVECOT_DEPENDENCIES += icu
  45. else
  46. DOVECOT_CONF_OPTS += --without-icu
  47. endif
  48. ifeq ($(BR2_PACKAGE_LIBCAP),y)
  49. DOVECOT_CONF_OPTS += --with-libcap
  50. DOVECOT_DEPENDENCIES += libcap
  51. else
  52. DOVECOT_CONF_OPTS += --without-libcap
  53. endif
  54. ifeq ($(BR2_PACKAGE_LIBSODIUM),y)
  55. DOVECOT_CONF_OPTS += --with-sodium
  56. DOVECOT_DEPENDENCIES += libsodium
  57. else
  58. DOVECOT_CONF_OPTS += --without-sodium
  59. endif
  60. ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
  61. DOVECOT_CONF_OPTS += --with-pam
  62. DOVECOT_DEPENDENCIES += linux-pam
  63. else
  64. DOVECOT_CONF_OPTS += --without-pam
  65. endif
  66. ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL),y)
  67. DOVECOT_CONF_ENV += MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config"
  68. DOVECOT_CONF_OPTS += --with-mysql
  69. DOVECOT_DEPENDENCIES += mysql
  70. else
  71. DOVECOT_CONF_OPTS += --without-mysql
  72. endif
  73. ifeq ($(BR2_PACKAGE_DOVECOT_SQLITE),y)
  74. DOVECOT_CONF_OPTS += --with-sqlite
  75. DOVECOT_DEPENDENCIES += sqlite
  76. else
  77. DOVECOT_CONF_OPTS += --without-sqlite
  78. endif
  79. ifeq ($(BR2_PACKAGE_LZ4),y)
  80. DOVECOT_CONF_OPTS += --with-lz4
  81. DOVECOT_DEPENDENCIES += lz4
  82. else
  83. DOVECOT_CONF_OPTS += --without-lz4
  84. endif
  85. ifeq ($(BR2_PACKAGE_XZ),y)
  86. DOVECOT_CONF_OPTS += --with-lzma
  87. DOVECOT_DEPENDENCIES += xz
  88. else
  89. DOVECOT_CONF_OPTS += --without-lzma
  90. endif
  91. ifeq ($(BR2_PACKAGE_ZLIB),y)
  92. DOVECOT_CONF_OPTS += --with-zlib
  93. DOVECOT_DEPENDENCIES += zlib
  94. else
  95. DOVECOT_CONF_OPTS += --without-zlib
  96. endif
  97. # fix paths to avoid using /usr/lib/dovecot
  98. define DOVECOT_POST_CONFIGURE
  99. for i in $$(find $(@D) -name "Makefile"); do \
  100. $(SED) 's%^pkglibdir =.*%pkglibdir = \$$(libdir)%' $$i; \
  101. $(SED) 's%^pkglibexecdir =.*%pkglibexecdir = \$$(libexecdir)%' $$i; \
  102. done
  103. endef
  104. DOVECOT_POST_CONFIGURE_HOOKS += DOVECOT_POST_CONFIGURE
  105. # dovecot installs dovecot-config in usr/lib/, therefore
  106. # DOVECOT_CONFIG_SCRIPTS can not be used to rewrite paths
  107. define DOVECOT_FIX_STAGING_DOVECOT_CONFIG
  108. $(SED) 's,^LIBDOVECOT_INCLUDE=.*$$,LIBDOVECOT_INCLUDE=\"-I$(STAGING_DIR)/usr/include/dovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config
  109. $(SED) 's,^LIBDOVECOT=.*$$,LIBDOVECOT=\"-L$(STAGING_DIR)/usr/lib -ldovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config
  110. endef
  111. DOVECOT_POST_INSTALL_STAGING_HOOKS += DOVECOT_FIX_STAGING_DOVECOT_CONFIG
  112. $(eval $(autotools-package))