2 # Maintainer: Ng Oon-Ee <ngoonee.talk@gmail.com>
3 # Based of package in [extra] by: Andreas Radke <andyrtr@archlinux.org>
5 pkgname=dovecot-systemd
9 pkgdesc="An IMAP and POP3 server written with security primarily in mind. With systemd support"
10 arch=('i686' 'x86_64')
11 url="http://dovecot.org/"
13 depends=('krb5' 'openssl' 'sqlite3>=3.7.5' 'libmysqlclient>=5.5.10'
14 'postgresql-libs>=9.0.3' 'bzip2' 'expat' 'curl' 'systemd')
15 makedepends=('pam>=1.1.1' 'libcap>=2.19' 'libldap>=2.4.22')
16 optdepends=('libldap: ldap plugin')
17 provides=('imap-server' 'pop3-server' 'dovecot')
20 backup=(etc/dovecot/dovecot.conf
21 etc/dovecot/conf.d/{10-auth,10-director,10-logging,10-mail,10-master,10-ssl}.conf
22 etc/dovecot/conf.d/{15-lda,20-imap,20-lmtp,20-pop3}.conf
23 etc/dovecot/conf.d/{90-acl,90-plugin,90-quota}.conf
24 etc/dovecot/conf.d/auth-{checkpassword,deny,ldap,master,passwdfile,sql,static,system,vpopmail}.conf.ext
25 etc/ssl/dovecot-openssl.cnf)
26 install=$pkgname.install
27 source=(http://dovecot.org/releases/2.0/${_pkgname}-${pkgver}.tar.gz dovecot.sh)
28 md5sums=('e01a29a355afefcb9fb5f8b7a54e1a14'
29 '587159e84e2da6f83d70b3c706ba87cc')
31 cd ${srcdir}/$_pkgname-$pkgver
33 # configure with openssl, mysql, and postgresql support
34 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
35 --libexecdir=/usr/lib --with-moduledir=/usr/lib/dovecot/modules \
39 --with-systemdsystemunitdir=/lib/systemd/system \
43 --with-ssl=openssl --with-ssldir=/etc/dovecot/ssl \
46 --with-zlib --with-bzlib \
54 cd ${srcdir}/$_pkgname-$pkgver
55 make DESTDIR=${pkgdir} install
57 # install the launch script
58 install -D -m755 ${srcdir}/$_pkgname.sh ${pkgdir}/etc/rc.d/$_pkgname
60 # install example conf files and ssl.conf
61 install -d -m755 ${pkgdir}/etc/dovecot/conf.d
62 install -m 644 ${pkgdir}/usr/share/doc/dovecot/example-config/conf.d/*.conf ${pkgdir}/etc/dovecot/conf.d
63 install -m 644 ${pkgdir}/usr/share/doc/dovecot/example-config/conf.d/*.conf.ext ${pkgdir}/etc/dovecot/conf.d
64 install -m 644 ${pkgdir}/usr/share/doc/dovecot/example-config/dovecot.conf ${pkgdir}/etc/dovecot/
65 install -d -m755 ${pkgdir}/etc/ssl
66 install -m 644 ${srcdir}/$_pkgname-$pkgver/doc/dovecot-openssl.cnf ${pkgdir}/etc/ssl/
68 rm ${pkgdir}/etc/dovecot/README
70 # install dovecot userdir - https://bugs.archlinux.org/task/20533
71 install -d -m755 ${pkgdir}/var/run/dovecot/{login,empty}
72 chmod 755 ${pkgdir}/var/run/dovecot
73 chmod 750 ${pkgdir}/var/run/dovecot/login