1220dafdbSAndrew GeisslerSUMMARY = "Dovecot is an open source IMAP and POP3 email server" 2220dafdbSAndrew GeisslerHOMEPAGE = "https://www.dovecot.org/" 3220dafdbSAndrew GeisslerDESCRIPTION = "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." 4220dafdbSAndrew GeisslerSECTION = "mail" 5220dafdbSAndrew GeisslerLICENSE = "LGPL-2.1-only & MIT" 6220dafdbSAndrew GeisslerLIC_FILES_CHKSUM = "file://COPYING;md5=2956560272e5b31d9d64f03111732048" 7220dafdbSAndrew Geissler 8220dafdbSAndrew GeisslerSRC_URI = "http://dovecot.org/releases/2.3/dovecot-${PV}.tar.gz \ 9220dafdbSAndrew Geissler file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \ 10220dafdbSAndrew Geissler file://dovecot.service \ 11220dafdbSAndrew Geissler file://dovecot.socket \ 12220dafdbSAndrew Geissler file://0001-not-check-pandoc.patch \ 13220dafdbSAndrew Geissler file://0001-m4-Check-for-libunwind-instead-of-libunwind-generic.patch \ 14220dafdbSAndrew Geissler " 15220dafdbSAndrew GeisslerSRC_URI[sha256sum] = "05b11093a71c237c2ef309ad587510721cc93bbee6828251549fc1586c36502d" 16220dafdbSAndrew Geissler 17220dafdbSAndrew GeisslerDEPENDS = "openssl xz zlib bzip2 libcap icu libtirpc bison-native" 18220dafdbSAndrew GeisslerCFLAGS += "-I${STAGING_INCDIR}/tirpc" 19220dafdbSAndrew GeisslerLDFLAGS += "-ltirpc" 20220dafdbSAndrew Geissler 21220dafdbSAndrew Geisslerinherit autotools pkgconfig systemd useradd gettext multilib_header 22220dafdbSAndrew Geissler 23220dafdbSAndrew GeisslerPACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam systemd', d)}" 24220dafdbSAndrew Geissler 25220dafdbSAndrew GeisslerPACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," 26220dafdbSAndrew GeisslerPACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd," 27220dafdbSAndrew GeisslerPACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap," 28220dafdbSAndrew GeisslerPACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," 29220dafdbSAndrew Geissler 30220dafdbSAndrew Geissler# From native build in armv7a-hf/eglibc 31220dafdbSAndrew GeisslerCACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \ 32220dafdbSAndrew Geissler i_cv_gmtime_max_time_t=32 \ 33220dafdbSAndrew Geissler i_cv_signed_time_t=yes \ 34220dafdbSAndrew Geissler i_cv_mmap_plays_with_write=yes \ 35220dafdbSAndrew Geissler i_cv_fd_passing=yes \ 36220dafdbSAndrew Geissler i_cv_c99_vsnprintf=yes \ 37220dafdbSAndrew Geissler lib_cv___va_copy=yes \ 38220dafdbSAndrew Geissler lib_cv_va_copy=yes \ 39220dafdbSAndrew Geissler lib_cv_va_val_copy=yes \ 40220dafdbSAndrew Geissler " 41220dafdbSAndrew Geissler 42220dafdbSAndrew Geissler# hardcode epoll() to avoid running unsafe tests 43220dafdbSAndrew Geissler# BSD needs kqueue and uclibc poll() 44220dafdbSAndrew GeisslerEXTRA_OECONF = " --with-ioloop=epoll" 45220dafdbSAndrew Geissler 46220dafdbSAndrew GeisslerSYSTEMD_PACKAGES = "${PN}" 47220dafdbSAndrew GeisslerSYSTEMD_SERVICE:${PN} = "dovecot.service dovecot.socket" 48220dafdbSAndrew GeisslerSYSTEMD_AUTO_ENABLE = "disable" 49220dafdbSAndrew Geissler 50220dafdbSAndrew Geisslerdo_install:append () { 51220dafdbSAndrew Geissler rm -rf ${D}${libdir}/dovecot/dovecot-config 52220dafdbSAndrew Geissler install -d 755 ${D}/etc/dovecot 53220dafdbSAndrew Geissler touch 644 ${D}/etc/dovecot/dovecot.conf 54220dafdbSAndrew Geissler if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then 55*edff4923SAndrew Geissler install -m 0644 ${UNPACKDIR}/dovecot.service ${D}${systemd_unitdir}/system 56220dafdbSAndrew Geissler sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service 57220dafdbSAndrew Geissler sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service 58220dafdbSAndrew Geissler fi 59220dafdbSAndrew Geissler oe_multilib_header dovecot/config.h 60220dafdbSAndrew Geissler} 61220dafdbSAndrew Geissler 62220dafdbSAndrew GeisslerUSERADD_PACKAGES = "${PN}" 63220dafdbSAndrew GeisslerUSERADD_PARAM:${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \ 64220dafdbSAndrew Geissler -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull" 65220dafdbSAndrew GeisslerGROUPADD_PARAM:${PN} = "-f -r dovecot;-f -r dovenull" 66220dafdbSAndrew Geissler 67220dafdbSAndrew GeisslerFILES:${PN} += "${libdir}/dovecot/*plugin.so \ 68220dafdbSAndrew Geissler ${libdir}/dovecot/libfs_compress.so \ 69220dafdbSAndrew Geissler ${libdir}/dovecot/libssl_iostream_openssl.so" 70220dafdbSAndrew GeisslerFILES:${PN}-staticdev += "${libdir}/dovecot/*/*.a" 71220dafdbSAndrew GeisslerFILES:${PN}-dev += "${libdir}/dovecot/libdovecot*.so" 72220dafdbSAndrew GeisslerFILES:${PN}-dbg += "${libdir}/dovecot/*/.debug" 73220dafdbSAndrew Geissler 74220dafdbSAndrew GeisslerCVE_STATUS[CVE-2016-4983] = "not-applicable-platform: Affects only postinstall script on specific distribution." 75