blob: 1663408736087cb80b615db066480ad018d5d11b [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "https://www.dovecot.org/"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05003DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory."
4SECTION = "mail"
5LICENSE = "LGPLv2.1 & MIT"
6LIC_FILES_CHKSUM = "file://COPYING;md5=a981379bd0f1c362f8d1d21515e5b30b"
7
8SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \
9 file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
10 file://dovecot.service \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011 file://dovecot.socket \
12 file://0001-doveadm-Fix-parallel-build.patch \
13 "
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014
15SRC_URI[md5sum] = "ff95486a5c43025a2c3f5a712e7962b9"
16SRC_URI[sha256sum] = "d939ea99126eb8a8c6955390b422b6e27ec0fa43a3b59b2b3218cb5ad67139a6"
17
18DEPENDS = "openssl xz zlib bzip2 libcap icu"
19
20DEPENDS_append_libc-musl = " libtirpc"
21CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
22LDFLAGS_append_libc-musl = " -ltirpc"
23
24inherit autotools pkgconfig systemd useradd
25
26PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
27
28PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
29PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
30PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
31
32# From native build in armv7a-hf/eglibc
33CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \
34 i_cv_gmtime_max_time_t=32 \
35 i_cv_signed_time_t=yes \
36 i_cv_mmap_plays_with_write=yes \
37 i_cv_fd_passing=yes \
38 i_cv_c99_vsnprintf=yes \
39 lib_cv___va_copy=yes \
40 lib_cv_va_copy=yes \
41 lib_cv_va_val_copy=yes \
42 "
43
44# hardcode epoll() to avoid running unsafe tests
45# BSD needs kqueue and uclibc poll()
46EXTRA_OECONF = " --with-ioloop=epoll \
47 --with-systemdsystemunitdir=${systemd_unitdir}/system"
48
49SYSTEMD_PACKAGES = "${PN}"
50SYSTEMD_SERVICE_${PN} = "dovecot.service dovecot.socket"
51SYSTEMD_AUTO_ENABLE = "disable"
52
53do_install_append () {
54 install -d 755 ${D}/etc/dovecot
55 touch 644 ${D}/etc/dovecot/dovecot.conf
56 install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
57 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
58 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
59}
60
61USERADD_PACKAGES = "${PN}"
62USERADD_PARAM_${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
63 -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
64GROUPADD_PARAM_${PN} = "-f -r dovecot;-f -r dovenull"
65
66FILES_${PN} += "${libdir}/dovecot/*plugin.so \
67 ${libdir}/dovecot/libfs_compress.so \
68 ${libdir}/dovecot/libssl_iostream_openssl.so"
69FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a"
70FILES_${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
71FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug"