2 # Copyright (C) 2006-2018 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://dovecot.org
/releases
/2.3
16 PKG_HASH
:=06e73f668c6c093c45bdeeeb7c20398ab8dc49317234f4b5781ac5e2cc5d6c33
18 PKG_MAINTAINER
:=Lucian Cristian
<lucian.cristian@gmail.com
>
19 PKG_LICENSE
:=LGPL-2.1
-only MIT BSD-3-Clause
20 PKG_LICENSE_FILES
:=COPYING COPYING.LGPL COPYING.MIT
21 PKG_CPE_ID
:=cpe
:/a
:dovecot
:dovecot
23 PKG_CONFIG_DEPENDS
:= \
24 CONFIG_DOVECOT_GSSAPI \
26 CONFIG_DOVECOT_MYSQL \
27 CONFIG_DOVECOT_PGSQL \
28 CONFIG_DOVECOT_SQLITE \
35 include $(INCLUDE_DIR
)/package.mk
36 # iconv is needed when compiling with MySQL support. iconv will also be used by
38 include $(INCLUDE_DIR
)/nls.mk
40 define Package
/dovecot
43 TITLE
:=An IMAP and POP3 daemon
44 URL
:=https
://www.dovecot.org
/
45 DEPENDS
:=+DOVECOT_GSSAPI
:krb5-libs
+DOVECOT_LDAP
:libopenldap
+DOVECOT_MYSQL
:libmysqlclient
+DOVECOT_PGSQL
:libpq
+DOVECOT_SQLITE
:libsqlite3
+libopenssl
+librt
+zlib
+libbz2
+libcap
+DOVECOT_ICU
:icu
$(ICONV_DEPENDS
)
46 USERID
:=dovecot
=59:dovecot
=59 dovenull
=60:dovenull
=60
47 ABI_VERSION
:=$(PKG_VERSION
)
50 define Package
/dovecot
/description
51 Dovecot is a program which provides POP3 and IMAP services.
54 define Package
/dovecot
/config
55 source
"$(SOURCE)/Config.in"
58 define Package
/dovecot
/conffiles
62 define Package
/dovecot-utils
66 TITLE
:=doveadm and dsync utilities for Dovecot
70 --libexecdir
=/usr
/libexec \
73 --with-notify
=dnotify \
78 $(if
$(CONFIG_DOVECOT_GSSAPI
),--with-gssapi
=yes
,--with-gssapi
=no
) \
79 $(if
$(CONFIG_DOVECOT_LDAP
),--with-ldap
=yes
,--with-ldap
=no
) \
80 $(if
$(CONFIG_DOVECOT_MYSQL
),--with-mysql
=yes
,--with-mysql
=no
) \
81 $(if
$(CONFIG_DOVECOT_PGSQL
),--with-pgsql
=yes
,--with-pgsql
=no
) \
82 $(if
$(CONFIG_DOVECOT_SQLITE
),--with-sqlite
=yes
,--with-sqlite
=no
) \
83 $(if
$(CONFIG_DOVECOT_ICU
),--with-icu
=yes
,--with-icu
=no
)
87 i_cv_signed_size_t
=no \
88 i_cv_signed_time_t
=no \
89 i_cv_gmtime_max_time_t
=32 \
90 i_cv_mmap_plays_with_write
=yes \
92 i_cv_c99_vsnprintf
=yes \
95 lib_cv___va_copy
=yes \
96 lib_cv_va_val_copy
=yes \
97 ac_cv_prog_KRB5CONFIG
="krb5-config"
99 define Build
/InstallDev
100 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/dovecot
$(1)/usr
/include/
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dovecot
$(1)/usr
/lib
/
103 $(call libtool_remove_files
,$(1))
107 define Package
/dovecot
/install
108 $(INSTALL_DIR
) $(1)/etc
/init.d
109 $(INSTALL_BIN
) .
/files
/dovecot.init
$(1)/etc
/init.d
/dovecot
111 $(INSTALL_DIR
) $(1)/etc
/dovecot
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/dovecot
/example-config
/* $(1)/etc
/dovecot
/
114 $(INSTALL_DIR
) $(1)/usr
/lib
/dovecot
115 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dovecot
/* $(1)/usr
/lib
/dovecot
/
116 rm $(1)/usr
/lib
/dovecot
/dovecot-config
117 find
$(1)/usr
/lib
/dovecot
/ -name
"*.a" -o
-name
"*.la" |
$(XARGS
) rm -f
119 $(INSTALL_DIR
) $(1)/usr
/libexec
/dovecot
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/libexec
/dovecot
/* $(1)/usr
/libexec
/dovecot
/
122 $(INSTALL_DIR
) $(1)/usr
/bin
123 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/doveconf
$(1)/usr
/bin
/
125 $(INSTALL_DIR
) $(1)/usr
/sbin
126 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/* $(1)/usr
/sbin
/
129 define Package
/dovecot-utils
/install
130 $(INSTALL_DIR
) $(1)/usr
/bin
131 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/doveadm
$(1)/usr
/bin
/
132 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dsync
$(1)/usr
/bin
/
135 $(eval
$(call BuildPackage
,dovecot
))
136 $(eval
$(call BuildPackage
,dovecot-utils
))