updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / dovecot+sieve / PKGBUILD
blobb1d021204bb95850c9462f33cef551ccb413e2d8
1 # Contributor: Paul Mattal <paul@mattal.com>
2 # Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
3 # Contributor: GARETTE Emmanuel <gnunux at laposte dot net>
4 # Contributor: Ingmar Steen <iksteen@gmail.com>
5 # Upstream maintainer of dovecot package: Andreas Radke <andyrtr@archlinux.org>
6 # AUR maintainer of dovecot+sieve package: Ingmar Steen <iksteen@gmail.com>
8 # This package is a combination of dovecot and the dovecot-sieve plugin that
9 # comes with the dovecot-sieve tools.
11 # NOTE: Version numbers are hard-coded in the source variable to help AUR.
13 pkgname=dovecot+sieve
14 pkgver=1.2.6+0.1.13
15 _pkgver_dovecot=${pkgver%+*}
16 _pkgver_sieve=${pkgver#*+}
17 pkgrel=2
18 pkgdesc="An IMAP and POP3 server written with security primarily in mind"
19 arch=('i686' 'x86_64')
20 url="http://dovecot.org/"
21 license=("LGPL")
22 depends=("pam>=1.0.4" "libmysqlclient>=5.1.38" "postgresql-libs>=8.4.1-1" "sqlite3>=3.6.18" "db>=4.8"
23          "heimdal>=1.2.1-6" 'libcap>=2.17' 'bzip2')
24 optdepends=('libldap: ldap plugin')
25 makedepends=('libldap>=2.4.18-1')
26 provides=('dovecot' 'dovecot-sieve' 'imap-server' 'pop3-server')
27 conflicts=('dovecot' 'dovecot-sieve')
28 options=('!libtool')
29 install=dovecot.install
30 source=(http://dovecot.org/releases/1.2/dovecot-1.2.6.tar.gz
31         http://www.rename-it.nl/dovecot/1.2/dovecot-1.2-sieve-0.1.13.tar.gz
32         dovecot.sh)
33 md5sums=('807666f1a112e7379c4dbb57c9ce4899'
34          '6151ab50e24abc0384358b1618c8048f'
35          'd020d43eab4ded6fb379dadc570a9490')
37 build() {
38   cd "${srcdir}/dovecot-$_pkgver_dovecot" || return 1
40   # configure with openssl, mysql, and postgresql support
41   ./configure --prefix=/usr --sysconfdir=/etc/dovecot --localstatedir=/var \
42         --libexecdir=/usr/lib  --with-moduledir=/usr/lib/dovecot/modules \
43         --with-db --with-mysql --with-pgsql --with-sqlite \
44         --with-ssl=openssl --with-ssldir=/etc/dovecot/ssl \
45         --with-gssapi --with-ldap=plugin --enable-header-install --with-docs || return 1
47   make || return 1
48   make DESTDIR=${pkgdir} install || return 1
50   # install the launch script
51   install -D -m755 ${srcdir}/dovecot.sh ${pkgdir}/etc/rc.d/dovecot || return 1
53   # fix paths in the config example file where we have a different layout
54   sed -i 's|/usr/lib/dovecot|/usr/lib/dovecot/modules|g;
55           s|libexec|lib|g;
56           s|lib/sendmail|sbin/sendmail|g' $pkgdir/etc/dovecot/dovecot-example.conf || return 1
57   
58   # build and install sieve plugin
59   cd "$srcdir/dovecot-1.2-sieve-$_pkgver_sieve" || return 1
61   ./configure --prefix=/usr --with-dovecot=../dovecot-$_pkgver_dovecot || return 1
62   make || return 1
63   make DESTDIR="$pkgdir" install || return 1