upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / dovecot / trunk / PKGBUILD
blob436beaea3c5f591e5b10ea7213d46bfea841e37b
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:
11 #   +pigeonhole
12 #   +dovecot-fts-elastic
13 #   +dovecot-fts-xapian
15 pkgname=dovecot
16 pkgver=2.3.20
17 pkgrel=1
19 pkgdesc="An IMAP and POP3 server written with security primarily in mind"
20 url="https://dovecot.org/"
21 arch=('x86_64')
22 license=("LGPL")
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'
42         'dovecot.sysusersd'
43         'dovecot.tmpfilesd'
44         'dovecot.ld.so.conf'
45         'dovecot.pam')
47 sha256sums=('caa832eb968148abdf35ee9d0f534b779fa732c0ce4a913d9ab8c3469b218552'
48             'SKIP'
49             '356e5761dc9161283cb795e62997c807ca081f4b42b443001cce07c03c47876d'
50             'c5e3a8ffe23e5deb4f7893d9877d972347c2ee45c4ebf713de85c537e47cfcaf'
51             '0b0625b1e66ca6a95d506fd00d6a68e70620c8ea28606e2528953ffb1806b08e'
52             'a457a1691cfa82495fc0503bfa4b61e54b149e63400fe0f568dff2c24a3f7858'
53             'ad9245f5e916480edd67139603cbe52e7a868233075f900ab63a0ce58f03741a')
55 validpgpkeys=(
56   'E643F0BDFDCD04D9FFCB6279C948525140558AC9' # Timo Sirainen <tss@iki.fi>
57   '2BE74AAB3EE754DFB9C80D3318A348AEED409DA1' # Dovecot Community Edition
60 prepare() {
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
68 build() {
69   cd "${srcdir}/${pkgname}-${pkgver}"
71   ./configure \
72     --prefix=/usr \
73     --sbindir=/usr/bin \
74     --sysconfdir=/etc \
75     --localstatedir=/var \
76     --libexecdir=/usr/lib \
77     --with-rundir=/run/dovecot \
78     --with-moduledir=/usr/lib/dovecot/modules \
79     --disable-static \
80     --with-nss \
81     --with-pam \
82     --with-sqlite \
83     --with-pgsql \
84     --with-mysql \
85     --with-ssl=openssl \
86     --with-ssldir=/etc/ssl \
87     --with-gssapi \
88     --with-ldap=plugin \
89     --with-lua=plugin \
90     --with-zlib \
91     --with-bzlib \
92     --with-lzma \
93     --with-lz4 \
94     --with-zstd \
95     --with-lucene \
96     --with-solr \
97     --with-sodium \
98     --with-libcap \
99     --with-docs
101   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
103   make
106 check() {
107   cd "${srcdir}/${pkgname}-${pkgver}"
108   make check
111 package() {
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"
127   # add dovecot libdir
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"