blob: c0f2863dbf8c5b48f9c78e3ff7e7eab8f1840e31 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -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"
Andrew Geisslereef63862021-01-29 15:58:13 -06006LIC_FILES_CHKSUM = "file://COPYING;md5=2956560272e5b31d9d64f03111732048"
Brad Bishopc342db32019-05-15 21:57:59 -04007
Andrew Geisslereef63862021-01-29 15:58:13 -06008SRC_URI = "http://dovecot.org/releases/2.3/dovecot-${PV}.tar.gz \
Brad Bishopc342db32019-05-15 21:57:59 -04009 file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
10 file://dovecot.service \
11 file://dovecot.socket \
Andrew Geisslereef63862021-01-29 15:58:13 -060012 file://0001-not-check-pandoc.patch \
Brad Bishopc342db32019-05-15 21:57:59 -040013 "
14
Andrew Geissler32b11992021-03-31 13:37:05 -050015SRC_URI[md5sum] = "2f03532cec3280ae45a101a7a55ccef5"
16SRC_URI[sha256sum] = "c8b3d7f3af1e558a3ff0f970309d4013a4d3ce136f8c02a53a3b05f345b9a34a"
Brad Bishopc342db32019-05-15 21:57:59 -040017
Andrew Geisslereef63862021-01-29 15:58:13 -060018DEPENDS = "openssl xz zlib bzip2 libcap icu libtirpc bison-native"
Brad Bishopc342db32019-05-15 21:57:59 -040019CFLAGS += "-I${STAGING_INCDIR}/tirpc"
20LDFLAGS += "-ltirpc"
21
Andrew Geissler82c905d2020-04-13 13:39:40 -050022inherit autotools pkgconfig systemd useradd gettext
Brad Bishopc342db32019-05-15 21:57:59 -040023
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
Andrew Geissler4b7c1152020-11-30 19:55:29 -060047# Uses hidden symbols
48# libssl_iostream_openssl.so: undefined reference to `ssl_iostream_handshake'
49LTO = ""
50
Brad Bishopc342db32019-05-15 21:57:59 -040051SYSTEMD_PACKAGES = "${PN}"
52SYSTEMD_SERVICE_${PN} = "dovecot.service dovecot.socket"
53SYSTEMD_AUTO_ENABLE = "disable"
54
55do_install_append () {
56 install -d 755 ${D}/etc/dovecot
57 touch 644 ${D}/etc/dovecot/dovecot.conf
58 install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
59 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
60 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
61}
62
63USERADD_PACKAGES = "${PN}"
64USERADD_PARAM_${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
65 -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
66GROUPADD_PARAM_${PN} = "-f -r dovecot;-f -r dovenull"
67
68FILES_${PN} += "${libdir}/dovecot/*plugin.so \
69 ${libdir}/dovecot/libfs_compress.so \
70 ${libdir}/dovecot/libssl_iostream_openssl.so"
71FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a"
72FILES_${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
73FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug"