blob: 882d5d5543ea4de290333930743f7e2de3e17e17 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
2HOMEPAGE = "https://www.dovecot.org/"
3DESCRIPTION = "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 \
11 file://dovecot.socket \
12 file://0001-doveadm-Fix-parallel-build.patch \
13 "
14
15SRC_URI[md5sum] = "d61d1e923a22f9062cc9f47696882666"
16SRC_URI[sha256sum] = "e9483d68a7698d701bc06124fcf6e1b1f16380c2986c7ec0cf4e1475b9d0c218"
17
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018DEPENDS = "openssl xz zlib bzip2 libcap icu libtirpc"
19CFLAGS += "-I${STAGING_INCDIR}/tirpc"
20LDFLAGS += "-ltirpc"
Brad Bishop316dfdd2018-06-25 12:45:53 -040021
22inherit autotools pkgconfig systemd useradd
23
24PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
25
26PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
27PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
28PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
29
30# From native build in armv7a-hf/eglibc
31CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \
32 i_cv_gmtime_max_time_t=32 \
33 i_cv_signed_time_t=yes \
34 i_cv_mmap_plays_with_write=yes \
35 i_cv_fd_passing=yes \
36 i_cv_c99_vsnprintf=yes \
37 lib_cv___va_copy=yes \
38 lib_cv_va_copy=yes \
39 lib_cv_va_val_copy=yes \
40 "
41
42# hardcode epoll() to avoid running unsafe tests
43# BSD needs kqueue and uclibc poll()
44EXTRA_OECONF = " --with-ioloop=epoll \
45 --with-systemdsystemunitdir=${systemd_unitdir}/system"
46
47SYSTEMD_PACKAGES = "${PN}"
48SYSTEMD_SERVICE_${PN} = "dovecot.service dovecot.socket"
49SYSTEMD_AUTO_ENABLE = "disable"
50
51do_install_append () {
52 install -d 755 ${D}/etc/dovecot
53 touch 644 ${D}/etc/dovecot/dovecot.conf
54 install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
55 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
56 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
57}
58
59USERADD_PACKAGES = "${PN}"
60USERADD_PARAM_${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
61 -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
62GROUPADD_PARAM_${PN} = "-f -r dovecot;-f -r dovenull"
63
64FILES_${PN} += "${libdir}/dovecot/*plugin.so \
65 ${libdir}/dovecot/libfs_compress.so \
66 ${libdir}/dovecot/libssl_iostream_openssl.so"
67FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a"
68FILES_${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
69FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug"