1 # Maintainer: Johannes Löthberg <johannes@kyriasis.com>
2 # Maintainer: Thore Bödecker <foxxx0@archlinux.org>
3 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
4 # Contributor: Andreas Radke <andyrtr@archlinux.org>
5 # Contributor: Paul Mattal <paul@mattal.com>
6 # Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
7 # Contributor: GARETTE Emmanuel <gnunux at laposte dot net>
8 # Contributor: Phillip Schichtel <phillip@schich.tel>
10 # --->>> remember to rebuild/bump the following packages TOGETHER with a new dovecot ABI:
12 # +dovecot-fts-elastic
19 pkgdesc="An IMAP and POP3 server written with security primarily in mind"
20 url="https://dovecot.org/"
24 depends=('krb5' 'openssl' 'sqlite' 'mariadb-libs' 'libsodium'
25 'postgresql-libs' 'bzip2' 'lz4' 'expat' 'curl' 'pam' 'systemd-libs')
26 makedepends=('libcap' 'libldap' 'lua53' 'xz' 'clucene' 'systemd')
27 optdepends=('libldap: ldap plugin'
28 'lua53: LUA auth and push support'
29 'clucene: alternative FTS indexer')
31 provides=('imap-server' 'pop3-server')
33 backup=('etc/pam.d/dovecot')
35 # LTO seems to cause issues with at least up to 2.3.17.1
36 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=997513
37 # TODO regularly check if upstream has implemented in-code fixes w.r.t. LTO
38 options=('!emptydirs' '!lto')
40 source=("https://dovecot.org/releases/2.3/${pkgname}-${pkgver}.tar.gz"{,.sig}
41 'dovecot-2.3.14-opensslv3.patch'
47 sha256sums=('caa832eb968148abdf35ee9d0f534b779fa732c0ce4a913d9ab8c3469b218552'
49 '356e5761dc9161283cb795e62997c807ca081f4b42b443001cce07c03c47876d'
50 'c5e3a8ffe23e5deb4f7893d9877d972347c2ee45c4ebf713de85c537e47cfcaf'
51 '0b0625b1e66ca6a95d506fd00d6a68e70620c8ea28606e2528953ffb1806b08e'
52 'a457a1691cfa82495fc0503bfa4b61e54b149e63400fe0f568dff2c24a3f7858'
53 'ad9245f5e916480edd67139603cbe52e7a868233075f900ab63a0ce58f03741a')
56 'E643F0BDFDCD04D9FFCB6279C948525140558AC9' # Timo Sirainen <tss@iki.fi>
57 '2BE74AAB3EE754DFB9C80D3318A348AEED409DA1' # Dovecot Community Edition
61 cd "${srcdir}/${pkgname}-${pkgver}"
62 patch -Np1 -i ../dovecot-2.3.14-opensslv3.patch
64 # fix path in helper script
65 sed -i 's:OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}:OPENSSLCONFIG=${OPENSSLCONFIG- /etc/ssl/dovecot-openssl.cnf}:' doc/mkcert.sh
69 cd "${srcdir}/${pkgname}-${pkgver}"
75 --localstatedir=/var \
76 --libexecdir=/usr/lib \
77 --with-rundir=/run/dovecot \
78 --with-moduledir=/usr/lib/dovecot/modules \
86 --with-ssldir=/etc/ssl \
101 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
107 cd "${srcdir}/${pkgname}-${pkgver}"
112 # system user/group dovenull - 74
113 # system user/group dovecot - 76
115 cd "${srcdir}/${pkgname}-${pkgver}"
116 make DESTDIR="$pkgdir" install
117 install -Dm644 "${srcdir}/dovecot.sysusersd" \
118 "${pkgdir}/usr/lib/sysusers.d/dovecot.conf"
119 install -Dm644 "${srcdir}/dovecot.tmpfilesd" \
120 "${pkgdir}/usr/lib/tmpfiles.d/dovecot.conf"
121 install -d -m755 "${pkgdir}/etc/dovecot/conf.d"
122 rm -f "${pkgdir}/etc/dovecot/README"
124 # install mkcert helper script
125 install -m 755 doc/mkcert.sh "${pkgdir}/usr/lib/dovecot/mkcert.sh"
128 install -Dm644 "${srcdir}/dovecot.ld.so.conf" "${pkgdir}/etc/ld.so.conf.d/dovecot.conf"
130 # install PAM snippet for dovecot
131 install -Dm644 "${srcdir}/dovecot.pam" "${pkgdir}/etc/pam.d/dovecot"