# Contributor: Michael Mason # Maintainer: Natanael Copa pkgname=dovecot pkgver=2.0.10 pkgrel=0 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" install="dovecot.pre-install dovecot.post-install" subpackages="$pkgname-sample-config:config $pkgname-doc $pkgname-dev $pkgname-pgsql $pkgname-mysql $pkgname-sqlite" 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-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 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 defautl config and set defautl passdb to passwd sed -i -e 's,^ssl_cert =.*,ssl_cert =