1 ################################################################################
5 ################################################################################
7 DOVECOT_VERSION_MAJOR = 2.2
8 DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).16
9 DOVECOT_SITE = http://www.dovecot.org/releases/$(DOVECOT_VERSION_MAJOR)
10 DOVECOT_INSTALL_STAGING = YES
11 DOVECOT_LICENSE = LGPLv2.1
12 DOVECOT_LICENSE_FILES = COPYING COPYING.LGPL COPYING.MIT
13 DOVECOT_DEPENDENCIES = host-pkgconf $(if $(BR2_PACKAGE_LIBICONV),libiconv)
16 RPCGEN=__disable_RPCGEN_rquota \
17 i_cv_epoll_works=yes \
18 i_cv_inotify_works=yes \
19 i_cv_posix_fallocate_works=no \
20 i_cv_signed_size_t=no \
21 i_cv_gmtime_max_time_t=32 \
22 i_cv_signed_time_t=yes \
23 i_cv_mmap_plays_with_write=yes \
25 i_cv_c99_vsnprintf=yes \
27 lib_cv___va_copy=yes \
28 lib_cv_va_val_copy=yes
30 DOVECOT_CONF_OPTS = --without-docs
32 ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL)$(BR2_PACKAGE_DOVECOT_SQLITE),)
33 DOVECOT_CONF_OPTS += --without-sql
36 ifeq ($(BR2_PACKAGE_DOVECOT_BZIP2),y)
37 DOVECOT_CONF_OPTS += --with-bzlib
38 DOVECOT_DEPENDENCIES += bzip2
40 DOVECOT_CONF_OPTS += --without-bzlib
43 ifeq ($(BR2_PACKAGE_LIBCAP),y)
44 DOVECOT_CONF_OPTS += --with-libcap
45 DOVECOT_DEPENDENCIES += libcap
47 DOVECOT_CONF_OPTS += --without-libcap
50 ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL),y)
51 DOVECOT_CONF_ENV += MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config"
52 DOVECOT_CONF_OPTS += --with-mysql
53 DOVECOT_DEPENDENCIES += mysql
55 DOVECOT_CONF_OPTS += --without-mysql
58 ifeq ($(BR2_PACKAGE_DOVECOT_OPENSSL),y)
59 DOVECOT_CONF_OPTS += --with-ssl=openssl
60 DOVECOT_DEPENDENCIES += openssl
62 DOVECOT_CONF_OPTS += --with-ssl=no
65 ifeq ($(BR2_PACKAGE_DOVECOT_SQLITE),y)
66 DOVECOT_CONF_OPTS += --with-sqlite
67 DOVECOT_DEPENDENCIES += sqlite
69 DOVECOT_CONF_OPTS += --without-sqlite
72 ifeq ($(BR2_PACKAGE_DOVECOT_ZLIB),y)
73 DOVECOT_CONF_OPTS += --with-zlib
74 DOVECOT_DEPENDENCIES += zlib
76 DOVECOT_CONF_OPTS += --without-zlib
79 # fix paths to avoid using /usr/lib/dovecot
80 define DOVECOT_POST_CONFIGURE
81 for i in $$(find $(@D) -name "Makefile"); do \
82 $(SED) 's%^pkglibdir =.*%pkglibdir = \$$(libdir)%' $$i; \
83 $(SED) 's%^pkglibexecdir =.*%pkglibexecdir = \$$(libexecdir)%' $$i; \
87 DOVECOT_POST_CONFIGURE_HOOKS += DOVECOT_POST_CONFIGURE
89 # dovecot installs dovecot-config in usr/lib/, therefore
90 # DOVECOT_CONFIG_SCRIPTS can not be used to rewrite paths
91 define DOVECOT_FIX_STAGING_DOVECOT_CONFIG
92 $(SED) 's,^LIBDOVECOT_INCLUDE=.*$$,LIBDOVECOT_INCLUDE=\"-I$(STAGING_DIR)/usr/include/dovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config
93 $(SED) 's,^LIBDOVECOT=.*$$,LIBDOVECOT=\"-L$(STAGING_DIR)/usr/lib -ldovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config
96 DOVECOT_POST_INSTALL_STAGING_HOOKS += DOVECOT_FIX_STAGING_DOVECOT_CONFIG
98 $(eval $(autotools-package))