# Contributor: Daniel Moree <dmoree(AT)shadowbranch[DOT]com>
# Maintainer: Daniel Moree <dmoree(AT)shadowbranch[DOT]com>

pkgname=dovecot
pkgver=1.2.7
pkgrel=1
pkgdesc="Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written with security primarily in mind."
arch=('i686' 'x86_64')
url="http://www.dovecot.org/"
license=('LGPL')
groups=()
depends=('bzip2' 'openssl')
makedepends=()
optdepends=()
provides=('dovecot', 'imap_server', 'pop3_server')
conflicts=()
replaces=()
backup=('etc/dovecot/dovecot.conf')
options=(!libtool)
install=
source=("http://dovecot.org/releases/1.2/dovecot-1.2.7.tar.gz")
noextract=()
md5sums=('76e82536fc7010770acd9f969f845b79')

build() {
  cd $srcdir/$pkgname-$pkgver
  
  ./configure --prefix=/usr --sysconfdir=/etc/dovecot --localstatedir=/var \
	--libexecdir=/usr/lib  --with-moduledir=/usr/lib/dovecot/modules \
	--with-db --with-sql=plugin \
	--with-ssl=openssl --with-ssldir=/etc/dovecot/ssl \
	--with-docs || return 1
  
  make || return 1
}

package() {
  cd $srcdir/$pkgname-$pkgver

  make DESTDIR=$pkgdir install || return 1
}
