The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / dovecot / dovecot.mk
1 ################################################################################
2 #
3 # dovecot
4 #
5 ################################################################################
6
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)
14
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
29
30 DOVECOT_CONF_OPTS = --without-docs
31
32 ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL)$(BR2_PACKAGE_DOVECOT_SQLITE),)
33 DOVECOT_CONF_OPTS += --without-sql
34 endif
35
36 ifeq ($(BR2_PACKAGE_DOVECOT_BZIP2),y)
37 DOVECOT_CONF_OPTS += --with-bzlib
38 DOVECOT_DEPENDENCIES += bzip2
39 else
40 DOVECOT_CONF_OPTS += --without-bzlib
41 endif
42
43 ifeq ($(BR2_PACKAGE_LIBCAP),y)
44 DOVECOT_CONF_OPTS += --with-libcap
45 DOVECOT_DEPENDENCIES += libcap
46 else
47 DOVECOT_CONF_OPTS += --without-libcap
48 endif
49
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
54 else
55 DOVECOT_CONF_OPTS += --without-mysql
56 endif
57
58 ifeq ($(BR2_PACKAGE_DOVECOT_OPENSSL),y)
59 DOVECOT_CONF_OPTS += --with-ssl=openssl
60 DOVECOT_DEPENDENCIES += openssl
61 else
62 DOVECOT_CONF_OPTS += --with-ssl=no
63 endif
64
65 ifeq ($(BR2_PACKAGE_DOVECOT_SQLITE),y)
66 DOVECOT_CONF_OPTS += --with-sqlite
67 DOVECOT_DEPENDENCIES += sqlite
68 else
69 DOVECOT_CONF_OPTS += --without-sqlite
70 endif
71
72 ifeq ($(BR2_PACKAGE_DOVECOT_ZLIB),y)
73 DOVECOT_CONF_OPTS += --with-zlib
74 DOVECOT_DEPENDENCIES += zlib
75 else
76 DOVECOT_CONF_OPTS += --without-zlib
77 endif
78
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; \
84         done
85 endef
86
87 DOVECOT_POST_CONFIGURE_HOOKS += DOVECOT_POST_CONFIGURE
88
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
94 endef
95
96 DOVECOT_POST_INSTALL_STAGING_HOOKS += DOVECOT_FIX_STAGING_DOVECOT_CONFIG
97
98 $(eval $(autotools-package))