# Contributor: Michael Mason # Maintainer: Natanael Copa pkgname=dovecot pkgver=2.0.14 pkgrel=1 pkgdesc="IMAP and POP3 server" url="http://www.dovecot.org/" arch="all" license="LGPL-2.1" depends="openssl logrotate" pkgusers="dovecot dovenull" pkggroups="dovecot dovenull" makedepends="libcap-dev zlib-dev openssl-dev bzip2-dev postgresql-dev mysql-dev sqlite-dev heimdal-dev openldap-dev" install="dovecot.pre-install dovecot.post-install" subpackages="$pkgname-sample-config:config $pkgname-doc $pkgname-dev $pkgname-pgsql $pkgname-mysql $pkgname-sqlite $pkgname-gssapi $pkgname-ldap" source="http://www.dovecot.org/releases/2.0/$pkgname-$pkgver.tar.gz dovecot.logrotate dovecot.initd dovecot-sample-config.post-install " prepare() { cd "$srcdir"/$pkgname-$pkgver } build() { cd "$srcdir/$pkgname-$pkgver" ./configure --prefix=/usr \ --localstatedir=/var \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-gssapi=plugin \ --with-ldap=plugin \ --with-sql=plugin \ --with-mysql \ --with-sqlite \ --with-pgsql \ --with-ssl=openssl || return 1 make || return 1 } package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/dovecot/*.la \ "$pkgdir"/usr/lib/dovecot/*/*.la || return 1 install -d "$pkgdir"/var/run/dovecot \ "$pkgdir"/etc/ssl/dovecot install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -D "$srcdir"/dovecot.logrotate "$pkgdir"/etc/logrotate.d/dovecot # default config install doc/dovecot-openssl.cnf "$pkgdir"/etc/dovecot/ cp "$pkgdir"/usr/share/doc/dovecot/example-config/dovecot.conf \ "$pkgdir"/etc/dovecot/dovecot.conf || return 1 mkdir -p "$pkgdir"/etc/dovecot/conf.d # fix ssl dirs in default config and set defautl passdb to passwd sed -i -e 's,^ssl_cert =.*,ssl_cert =