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