# $Id: PKGBUILD 202249 2013-12-20 22:01:34Z andyrtr $ # Maintainer: Andreas Radke # Contributor: Paul Mattal # Contributor: Federico Quagliata (quaqo) # Contributor: GARETTE Emmanuel # --->>> remember to rebuild/bump pigeonhole in one step <<<--- pkgname=dovecot pkgver=2.2.10 pkgrel=1 pkgdesc="An IMAP and POP3 server written with security primarily in mind" arch=('i686' 'x86_64' 'mips64el') url="http://dovecot.org/" license=("LGPL") depends=('krb5' 'openssl' 'sqlite' 'libmariadbclient' 'postgresql-libs' 'bzip2' 'expat' 'curl') makedepends=('pam' 'libcap' 'libldap' 'clucene') optdepends=('libldap: ldap plugin' 'xz: imap zlib plugin' 'clucene: alternative FTS indexer') provides=('imap-server' 'pop3-server') install=$pkgname.install source=(http://dovecot.org/releases/2.2/${pkgname}-${pkgver}.tar.gz{,.sig} dovecot.tmpfilesd) md5sums=('037e9c9e07d9dbff54dcff09f280fc8c' 'SKIP' '342a28251d40f983c98c0d1f1bf3d07d') build() { cd $pkgname-$pkgver # fix path in helper script sed -i 's:OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}:OPENSSLCONFIG=${OPENSSLCONFIG- /etc/ssl/dovecot-openssl.cnf}:' doc/mkcert.sh # configure with openssl, mysql, and postgresql support ./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-libcap \ --with-solr \ --with-lucene \ --with-docs make } check() { cd $pkgname-$pkgver make -k check } package() { cd $pkgname-$pkgver make DESTDIR=${pkgdir} install # install example conf files and ssl.conf install -d -m755 ${pkgdir}/etc/dovecot/conf.d install -m 644 ${pkgdir}/usr/share/doc/dovecot/example-config/dovecot.conf ${pkgdir}/etc/dovecot/dovecot.conf.sample install -d -m755 ${pkgdir}/etc/ssl install -m 644 ${srcdir}/$pkgname-$pkgver/doc/dovecot-openssl.cnf ${pkgdir}/etc/ssl/dovecot-openssl.cnf.sample # install mkcert helper script install -m 755 ${srcdir}/$pkgname-$pkgver/doc/mkcert.sh ${pkgdir}/usr/lib/dovecot/mkcert.sh rm ${pkgdir}/etc/dovecot/README # systemd tmpfile install -d -m755 ${pkgdir}/usr/lib/tmpfiles.d install -m 644 ${srcdir}/dovecot.tmpfilesd ${pkgdir}/usr/lib/tmpfiles.d/dovecot.conf }