# $Id: PKGBUILD 302688 2018-03-05 13:26:01Z demize $ # Maintainer: Johannes Löthberg # Contributor: Bartłomiej Piotrowski # Contributor: Andreas Radke # Contributor: Paul Mattal # Contributor: Federico Quagliata (quaqo) # Contributor: GARETTE Emmanuel # --->>> remember to rebuild/bump pigeonhole in one step <<<--- pkgname=dovecot pkgver=2.3.0.1 pkgrel=2 pkgdesc="An IMAP and POP3 server written with security primarily in mind" url="http://dovecot.org/" arch=('x86_64') license=("LGPL") depends=('krb5' 'openssl' 'sqlite' 'libmariadbclient' 'postgresql-libs' 'bzip2' 'lz4' 'expat' 'curl' 'pam') makedepends=('libcap' 'libldap' 'clucene') optdepends=('libldap: ldap plugin' 'xz: imap zlib plugin' 'clucene: alternative FTS indexer') provides=('imap-server' 'pop3-server') source=("https://dovecot.org/releases/2.3/${pkgname}-${pkgver}.tar.gz"{,.sig} 'dovecot.sysusersd' 'dovecot.tmpfilesd' 'dovecot-fix-segfault-quota-exceeded.patch') sha256sums=('ab772b3e214683aba347203c9391295552255c4d69afb324c7b8c8fc5ad6f153' 'SKIP' 'c5e3a8ffe23e5deb4f7893d9877d972347c2ee45c4ebf713de85c537e47cfcaf' 'bb7620be7fc0217d77fcac940441c2abbd9efc6ef660153288d09ba412e27e06' 'e6ef27938a384a54b28c0ce57626dcd738f659465293f2cbb71712cbd5592136') validpgpkeys=('E643F0BDFDCD04D9FFCB6279C948525140558AC9' # Timo Sirainen '2BE74AAB3EE754DFB9C80D3318A348AEED409DA1') # Dovecot Community Edition prepare() { cd "${pkgname}-${pkgver}" # fix segfault (2.3.1 release might include the fix) patch -p1 -N -i "${srcdir}/dovecot-fix-segfault-quota-exceeded.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 dovecot-$pkgver ./configure --prefix=/usr --sysconfdir=/etc \ --sbindir=/usr/bin \ --localstatedir=/var \ --libexecdir=/usr/lib \ --with-moduledir=/usr/lib/dovecot/modules \ --with-systemdsystemunitdir=/usr/lib/systemd/system \ --disable-static \ --with-nss \ --with-pam \ --with-mysql \ --with-pgsql \ --with-sqlite \ --with-ssl=openssl \ --with-ssldir=/etc/ssl \ --with-gssapi \ --with-ldap=plugin \ --with-zlib \ --with-bzlib \ --with-lzma \ --with-lz4 \ --with-libcap \ --with-solr \ --with-lucene \ --with-docs make } check() { cd dovecot-$pkgver make check } package() { # system user/group dovenull - 74 # system user/group dovecot - 76 cd dovecot-$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" }