This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 297
/
PKGBUILD
132 lines (110 loc) · 4.07 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Maintainer: Thore Bödecker <foxxx0@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Paul Mattal <paul@mattal.com>
# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
# Contributor: GARETTE Emmanuel <gnunux at laposte dot net>
# Contributor: Phillip Schichtel <phillip@schich.tel>
# --->>> remember to rebuild/bump the following packages TOGETHER with a new dovecot ABI:
# +pigeonhole
# +dovecot-fts-elastic
# +dovecot-fts-xapian
pkgname=dovecot
pkgver=2.3.20
pkgrel=1
pkgdesc="An IMAP and POP3 server written with security primarily in mind"
url="https://dovecot.org/"
arch=('x86_64')
license=("LGPL")
depends=('krb5' 'openssl' 'sqlite' 'mariadb-libs' 'libsodium'
'postgresql-libs' 'bzip2' 'lz4' 'expat' 'curl' 'pam' 'systemd-libs')
makedepends=('libcap' 'libldap' 'lua53' 'xz' 'clucene' 'systemd')
optdepends=('libldap: ldap plugin'
'lua53: LUA auth and push support'
'clucene: alternative FTS indexer')
provides=('imap-server' 'pop3-server')
backup=('etc/pam.d/dovecot')
# LTO seems to cause issues with at least up to 2.3.17.1
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=997513
# TODO regularly check if upstream has implemented in-code fixes w.r.t. LTO
options=('!emptydirs' '!lto')
source=("https://dovecot.org/releases/2.3/${pkgname}-${pkgver}.tar.gz"{,.sig}
'dovecot-2.3.14-opensslv3.patch'
'dovecot.sysusersd'
'dovecot.tmpfilesd'
'dovecot.ld.so.conf'
'dovecot.pam')
sha256sums=('caa832eb968148abdf35ee9d0f534b779fa732c0ce4a913d9ab8c3469b218552'
'SKIP'
'356e5761dc9161283cb795e62997c807ca081f4b42b443001cce07c03c47876d'
'c5e3a8ffe23e5deb4f7893d9877d972347c2ee45c4ebf713de85c537e47cfcaf'
'0b0625b1e66ca6a95d506fd00d6a68e70620c8ea28606e2528953ffb1806b08e'
'a457a1691cfa82495fc0503bfa4b61e54b149e63400fe0f568dff2c24a3f7858'
'ad9245f5e916480edd67139603cbe52e7a868233075f900ab63a0ce58f03741a')
validpgpkeys=(
'E643F0BDFDCD04D9FFCB6279C948525140558AC9' # Timo Sirainen <tss@iki.fi>
'2BE74AAB3EE754DFB9C80D3318A348AEED409DA1' # Dovecot Community Edition
)
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np1 -i ../dovecot-2.3.14-opensslv3.patch
# fix path in helper script
sed -i 's:OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}:OPENSSLCONFIG=${OPENSSLCONFIG- /etc/ssl/dovecot-openssl.cnf}:' doc/mkcert.sh
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib \
--with-rundir=/run/dovecot \
--with-moduledir=/usr/lib/dovecot/modules \
--disable-static \
--with-nss \
--with-pam \
--with-sqlite \
--with-pgsql \
--with-mysql \
--with-ssl=openssl \
--with-ssldir=/etc/ssl \
--with-gssapi \
--with-ldap=plugin \
--with-lua=plugin \
--with-zlib \
--with-bzlib \
--with-lzma \
--with-lz4 \
--with-zstd \
--with-lucene \
--with-solr \
--with-sodium \
--with-libcap \
--with-docs
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
make check
}
package() {
# system user/group dovenull - 74
# system user/group dovecot - 76
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="$pkgdir" install
install -Dm644 "${srcdir}/dovecot.sysusersd" \
"${pkgdir}/usr/lib/sysusers.d/dovecot.conf"
install -Dm644 "${srcdir}/dovecot.tmpfilesd" \
"${pkgdir}/usr/lib/tmpfiles.d/dovecot.conf"
install -d -m755 "${pkgdir}/etc/dovecot/conf.d"
rm -f "${pkgdir}/etc/dovecot/README"
# install mkcert helper script
install -m 755 doc/mkcert.sh "${pkgdir}/usr/lib/dovecot/mkcert.sh"
# add dovecot libdir
install -Dm644 "${srcdir}/dovecot.ld.so.conf" "${pkgdir}/etc/ld.so.conf.d/dovecot.conf"
# install PAM snippet for dovecot
install -Dm644 "${srcdir}/dovecot.pam" "${pkgdir}/etc/pam.d/dovecot"
}