Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "Dovecot is an open source IMAP and POP3 email server" |
| 2 | HOMEPAGE = "https://www.dovecot.org/" |
| 3 | DESCRIPTION = "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." |
| 4 | SECTION = "mail" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 5 | LICENSE = "LGPL-2.1-only & MIT" |
Andrew Geissler | eef6386 | 2021-01-29 15:58:13 -0600 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=2956560272e5b31d9d64f03111732048" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 7 | |
Andrew Geissler | eef6386 | 2021-01-29 15:58:13 -0600 | [diff] [blame] | 8 | SRC_URI = "http://dovecot.org/releases/2.3/dovecot-${PV}.tar.gz \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 9 | file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \ |
| 10 | file://dovecot.service \ |
| 11 | file://dovecot.socket \ |
Andrew Geissler | eef6386 | 2021-01-29 15:58:13 -0600 | [diff] [blame] | 12 | file://0001-not-check-pandoc.patch \ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 13 | file://0001-m4-Check-for-libunwind-instead-of-libunwind-generic.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 14 | " |
| 15 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 16 | SRC_URI[md5sum] = "2f03532cec3280ae45a101a7a55ccef5" |
| 17 | SRC_URI[sha256sum] = "c8b3d7f3af1e558a3ff0f970309d4013a4d3ce136f8c02a53a3b05f345b9a34a" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 18 | |
Andrew Geissler | eef6386 | 2021-01-29 15:58:13 -0600 | [diff] [blame] | 19 | DEPENDS = "openssl xz zlib bzip2 libcap icu libtirpc bison-native" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 20 | CFLAGS += "-I${STAGING_INCDIR}/tirpc" |
| 21 | LDFLAGS += "-ltirpc" |
| 22 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | inherit autotools pkgconfig systemd useradd gettext |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 24 | |
| 25 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}" |
| 26 | |
| 27 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," |
| 28 | PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap," |
| 29 | PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," |
| 30 | |
| 31 | # From native build in armv7a-hf/eglibc |
| 32 | CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \ |
| 33 | i_cv_gmtime_max_time_t=32 \ |
| 34 | i_cv_signed_time_t=yes \ |
| 35 | i_cv_mmap_plays_with_write=yes \ |
| 36 | i_cv_fd_passing=yes \ |
| 37 | i_cv_c99_vsnprintf=yes \ |
| 38 | lib_cv___va_copy=yes \ |
| 39 | lib_cv_va_copy=yes \ |
| 40 | lib_cv_va_val_copy=yes \ |
| 41 | " |
| 42 | |
| 43 | # hardcode epoll() to avoid running unsafe tests |
| 44 | # BSD needs kqueue and uclibc poll() |
| 45 | EXTRA_OECONF = " --with-ioloop=epoll \ |
| 46 | --with-systemdsystemunitdir=${systemd_unitdir}/system" |
| 47 | |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 48 | # Uses hidden symbols |
| 49 | # libssl_iostream_openssl.so: undefined reference to `ssl_iostream_handshake' |
| 50 | LTO = "" |
| 51 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 52 | SYSTEMD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | SYSTEMD_SERVICE:${PN} = "dovecot.service dovecot.socket" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 54 | SYSTEMD_AUTO_ENABLE = "disable" |
| 55 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | do_install:append () { |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 57 | install -d 755 ${D}/etc/dovecot |
| 58 | touch 644 ${D}/etc/dovecot/dovecot.conf |
| 59 | install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system |
| 60 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service |
| 61 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service |
| 62 | } |
| 63 | |
| 64 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | USERADD_PARAM:${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 66 | -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 67 | GROUPADD_PARAM:${PN} = "-f -r dovecot;-f -r dovenull" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | FILES:${PN} += "${libdir}/dovecot/*plugin.so \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 70 | ${libdir}/dovecot/libfs_compress.so \ |
| 71 | ${libdir}/dovecot/libssl_iostream_openssl.so" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | FILES:${PN}-staticdev += "${libdir}/dovecot/*/*.a" |
| 73 | FILES:${PN}-dev += "${libdir}/dovecot/libdovecot*.so" |
| 74 | FILES:${PN}-dbg += "${libdir}/dovecot/*/.debug" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 75 | |
| 76 | # CVE-2016-4983 affects only postinstall script on specific distribution |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 77 | CVE_CHECK_IGNORE += "CVE-2016-4983" |