python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / dovecot / dovecot.mk
blobcaa6bbaeef2508fa828820d2a75b3ecf8f982e7a
1 ################################################################################
3 # dovecot
5 ################################################################################
7 DOVECOT_VERSION_MAJOR = 2.2
8 DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).28
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 = \
14 host-pkgconf \
15 $(if $(BR2_PACKAGE_LIBICONV),libiconv) \
16 openssl
18 DOVECOT_CONF_ENV = \
19 RPCGEN=__disable_RPCGEN_rquota \
20 i_cv_epoll_works=yes \
21 i_cv_inotify_works=yes \
22 i_cv_posix_fallocate_works=no \
23 i_cv_signed_size_t=no \
24 i_cv_gmtime_max_time_t=32 \
25 i_cv_signed_time_t=yes \
26 i_cv_mmap_plays_with_write=yes \
27 i_cv_fd_passing=yes \
28 i_cv_c99_vsnprintf=yes \
29 lib_cv_va_copy=yes \
30 lib_cv___va_copy=yes \
31 lib_cv_va_val_copy=yes
33 DOVECOT_CONF_OPTS = --without-docs --with-ssl=openssl
35 ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL)$(BR2_PACKAGE_DOVECOT_SQLITE),)
36 DOVECOT_CONF_OPTS += --without-sql
37 endif
39 ifeq ($(BR2_PACKAGE_BZIP2),y)
40 DOVECOT_CONF_OPTS += --with-bzlib
41 DOVECOT_DEPENDENCIES += bzip2
42 else
43 DOVECOT_CONF_OPTS += --without-bzlib
44 endif
46 ifeq ($(BR2_PACKAGE_ICU),y)
47 DOVECOT_CONF_OPTS += --with-icu
48 DOVECOT_DEPENDENCIES += icu
49 else
50 DOVECOT_CONF_OPTS += --without-icu
51 endif
53 ifeq ($(BR2_PACKAGE_LIBCAP),y)
54 DOVECOT_CONF_OPTS += --with-libcap
55 DOVECOT_DEPENDENCIES += libcap
56 else
57 DOVECOT_CONF_OPTS += --without-libcap
58 endif
60 ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL),y)
61 DOVECOT_CONF_ENV += MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config"
62 DOVECOT_CONF_OPTS += --with-mysql
63 DOVECOT_DEPENDENCIES += mysql
64 else
65 DOVECOT_CONF_OPTS += --without-mysql
66 endif
68 ifeq ($(BR2_PACKAGE_DOVECOT_SQLITE),y)
69 DOVECOT_CONF_OPTS += --with-sqlite
70 DOVECOT_DEPENDENCIES += sqlite
71 else
72 DOVECOT_CONF_OPTS += --without-sqlite
73 endif
75 ifeq ($(BR2_PACKAGE_LZ4),y)
76 DOVECOT_CONF_OPTS += --with-lz4
77 DOVECOT_DEPENDENCIES += lz4
78 else
79 DOVECOT_CONF_OPTS += --without-lz4
80 endif
82 ifeq ($(BR2_PACKAGE_XZ),y)
83 DOVECOT_CONF_OPTS += --with-lzma
84 DOVECOT_DEPENDENCIES += xz
85 else
86 DOVECOT_CONF_OPTS += --without-lzma
87 endif
89 ifeq ($(BR2_PACKAGE_ZLIB),y)
90 DOVECOT_CONF_OPTS += --with-zlib
91 DOVECOT_DEPENDENCIES += zlib
92 else
93 DOVECOT_CONF_OPTS += --without-zlib
94 endif
96 # fix paths to avoid using /usr/lib/dovecot
97 define DOVECOT_POST_CONFIGURE
98 for i in $$(find $(@D) -name "Makefile"); do \
99 $(SED) 's%^pkglibdir =.*%pkglibdir = \$$(libdir)%' $$i; \
100 $(SED) 's%^pkglibexecdir =.*%pkglibexecdir = \$$(libexecdir)%' $$i; \
101 done
102 endef
104 DOVECOT_POST_CONFIGURE_HOOKS += DOVECOT_POST_CONFIGURE
106 # dovecot installs dovecot-config in usr/lib/, therefore
107 # DOVECOT_CONFIG_SCRIPTS can not be used to rewrite paths
108 define DOVECOT_FIX_STAGING_DOVECOT_CONFIG
109 $(SED) 's,^LIBDOVECOT_INCLUDE=.*$$,LIBDOVECOT_INCLUDE=\"-I$(STAGING_DIR)/usr/include/dovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config
110 $(SED) 's,^LIBDOVECOT=.*$$,LIBDOVECOT=\"-L$(STAGING_DIR)/usr/lib -ldovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config
111 endef
113 DOVECOT_POST_INSTALL_STAGING_HOOKS += DOVECOT_FIX_STAGING_DOVECOT_CONFIG
115 $(eval $(autotools-package))