package/dovecot: bump version to 2.2.23
[buildroot-gz.git] / package / dovecot / dovecot.mk
blob21a9764f2bac28f972e6e908d6acfed8174477a8
1 ################################################################################
3 # dovecot
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)
15 DOVECOT_CONF_ENV = \
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 \
24 i_cv_fd_passing=yes \
25 i_cv_c99_vsnprintf=yes \
26 lib_cv_va_copy=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
34 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
43 ifeq ($(BR2_PACKAGE_ICU),y)
44 DOVECOT_CONF_OPTS += --with-icu
45 DOVECOT_DEPENDENCIES += icu
46 else
47 DOVECOT_CONF_OPTS += --without-icu
48 endif
50 ifeq ($(BR2_PACKAGE_LIBCAP),y)
51 DOVECOT_CONF_OPTS += --with-libcap
52 DOVECOT_DEPENDENCIES += libcap
53 else
54 DOVECOT_CONF_OPTS += --without-libcap
55 endif
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
61 else
62 DOVECOT_CONF_OPTS += --without-mysql
63 endif
65 ifeq ($(BR2_PACKAGE_DOVECOT_OPENSSL),y)
66 DOVECOT_CONF_OPTS += --with-ssl=openssl
67 DOVECOT_DEPENDENCIES += openssl
68 else
69 DOVECOT_CONF_OPTS += --with-ssl=no
70 endif
72 ifeq ($(BR2_PACKAGE_DOVECOT_SQLITE),y)
73 DOVECOT_CONF_OPTS += --with-sqlite
74 DOVECOT_DEPENDENCIES += sqlite
75 else
76 DOVECOT_CONF_OPTS += --without-sqlite
77 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
86 ifeq ($(BR2_PACKAGE_XZ),y)
87 DOVECOT_CONF_OPTS += --with-lzma
88 DOVECOT_DEPENDENCIES += xz
89 else
90 DOVECOT_CONF_OPTS += --without-lzma
91 endif
93 ifeq ($(BR2_PACKAGE_ZLIB),y)
94 DOVECOT_CONF_OPTS += --with-zlib
95 DOVECOT_DEPENDENCIES += zlib
96 else
97 DOVECOT_CONF_OPTS += --without-zlib
98 endif
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; \
105 done
106 endef
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
115 endef
117 DOVECOT_POST_INSTALL_STAGING_HOOKS += DOVECOT_FIX_STAGING_DOVECOT_CONFIG
119 $(eval $(autotools-package))