1 ################################################################################
5 ################################################################################
7 DOVECOT_VERSION_MAJOR
= 2.2
8 DOVECOT_VERSION
= $(DOVECOT_VERSION_MAJOR
).23
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_BZIP2
),y
)
37 DOVECOT_CONF_OPTS
+= --with-bzlib
38 DOVECOT_DEPENDENCIES
+= bzip2
40 DOVECOT_CONF_OPTS
+= --without-bzlib
43 ifeq ($(BR2_PACKAGE_ICU
),y
)
44 DOVECOT_CONF_OPTS
+= --with-icu
45 DOVECOT_DEPENDENCIES
+= icu
47 DOVECOT_CONF_OPTS
+= --without-icu
50 ifeq ($(BR2_PACKAGE_LIBCAP
),y
)
51 DOVECOT_CONF_OPTS
+= --with-libcap
52 DOVECOT_DEPENDENCIES
+= libcap
54 DOVECOT_CONF_OPTS
+= --without-libcap
57 ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL
),y
)
58 DOVECOT_CONF_ENV
+= MYSQL_CONFIG
="$(STAGING_DIR)/usr/bin/mysql_config"
59 DOVECOT_CONF_OPTS
+= --with-mysql
60 DOVECOT_DEPENDENCIES
+= mysql
62 DOVECOT_CONF_OPTS
+= --without-mysql
65 ifeq ($(BR2_PACKAGE_DOVECOT_OPENSSL
),y
)
66 DOVECOT_CONF_OPTS
+= --with-ssl
=openssl
67 DOVECOT_DEPENDENCIES
+= openssl
69 DOVECOT_CONF_OPTS
+= --with-ssl
=no
72 ifeq ($(BR2_PACKAGE_DOVECOT_SQLITE
),y
)
73 DOVECOT_CONF_OPTS
+= --with-sqlite
74 DOVECOT_DEPENDENCIES
+= sqlite
76 DOVECOT_CONF_OPTS
+= --without-sqlite
79 ifeq ($(BR2_PACKAGE_LZ4
),y
)
80 DOVECOT_CONF_OPTS
+= --with-lz4
81 DOVECOT_DEPENDENCIES
+= lz4
83 DOVECOT_CONF_OPTS
+= --without-lz4
86 ifeq ($(BR2_PACKAGE_XZ
),y
)
87 DOVECOT_CONF_OPTS
+= --with-lzma
88 DOVECOT_DEPENDENCIES
+= xz
90 DOVECOT_CONF_OPTS
+= --without-lzma
93 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
94 DOVECOT_CONF_OPTS
+= --with-zlib
95 DOVECOT_DEPENDENCIES
+= zlib
97 DOVECOT_CONF_OPTS
+= --without-zlib
100 # fix paths to avoid using /usr/lib/dovecot
101 define DOVECOT_POST_CONFIGURE
102 for i in
$$(find
$(@D
) -name
"Makefile"); do \
103 $(SED
) 's%^pkglibdir =.*%pkglibdir = \$$(libdir)%' $$i; \
104 $(SED
) 's%^pkglibexecdir =.*%pkglibexecdir = \$$(libexecdir)%' $$i; \
108 DOVECOT_POST_CONFIGURE_HOOKS
+= DOVECOT_POST_CONFIGURE
110 # dovecot installs dovecot-config in usr/lib/, therefore
111 # DOVECOT_CONFIG_SCRIPTS can not be used to rewrite paths
112 define DOVECOT_FIX_STAGING_DOVECOT_CONFIG
113 $(SED
) 's,^LIBDOVECOT_INCLUDE=.*$$,LIBDOVECOT_INCLUDE=\"-I$(STAGING_DIR)/usr/include/dovecot\",' $(STAGING_DIR
)/usr
/lib
/dovecot-config
114 $(SED
) 's,^LIBDOVECOT=.*$$,LIBDOVECOT=\"-L$(STAGING_DIR)/usr/lib -ldovecot\",' $(STAGING_DIR
)/usr
/lib
/dovecot-config
117 DOVECOT_POST_INSTALL_STAGING_HOOKS
+= DOVECOT_FIX_STAGING_DOVECOT_CONFIG
119 $(eval
$(autotools-package
))