# Contributor: Michael Mason # Maintainer: Natanael Copa pkgname=dovecot pkgver=1.2.11 pkgrel=3 pkgdesc="IMAP and POP3 server" url="http://www.dovecot.org/" license="LGPL-2.1" depends= makedepends="libcap-dev zlib-dev openssl-dev bzip2-dev postgresql-dev mysql-dev sqlite-dev" install="dovecot.pre-install" subpackages="$pkgname-doc $pkgname-dev $pkgname-pgsql $pkgname-mysql $pkgname-sqlite" source="http://www.dovecot.org/releases/1.2/$pkgname-$pkgver.tar.gz dovecot.initd " build() { cd "$srcdir/$pkgname-$pkgver" ./configure --prefix=/usr \ --sysconfdir=/etc/dovecot \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-sql=plugin \ --with-sql-drivers \ --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 install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname } _mv() { local i while [ $# -gt 0 ]; do local dir=${1%/*} mkdir -p "$subpkgdir"/$dir mv "$pkgdir/$1" "$subpkgdir/$dir/" shift done } pgsql() { pkgdesc="postgresql driver for dovecot" _mv $(cd "$pkgdir" && find usr -name '*pgsql.so') } mysql() { pkgdesc="mysql driver for dovecot" _mv $(cd "$pkgdir" && find usr -name '*mysql.so') } sqlite() { pkgdesc="sqlite driver for dovecot" _mv $(cd "$pkgdir" && find usr -name '*sqlite.so') } md5sums="bdac013fd57aa616ea4bdd9ac34557c6 dovecot-1.2.11.tar.gz c58b474dca20e6e60fa4f1f5b9c726e1 dovecot.initd"