# $Id: PKGBUILD 97130 2013-09-13 12:35:47Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: Sebastian Faltoni pkgname=dbmail pkgver=3.1.6 pkgrel=1 pkgdesc="Fast and scalable sql based mail services" arch=('i686' 'x86_64') depends=('gmime' 'libzdb' 'mhash' 'libevent') makedepends=('asciidoc' 'xmlto' 'docbook-xsl' 'docbook-xml' 'postgresql-libs>=8.4.1' 'sqlite' 'libmysqlclient' 'libldap>=2.4.18' 'libsieve') optdepends=('libldap: for LDAP authentication' 'libsieve: for dbmail-sieve' 'python2-mysql2pgsql: migrate from MySQL to PostreSQL') url="http://www.dbmail.org" license=('GPL') options=('!libtool' 'zipman') backup=(etc/xinetd.d/dbmail-imapd etc/xinetd.d/dbmail-pop3d etc/xinetd.d/dbmail-lmtpd etc/xinetd.d/dbmail-timsieved) source=("http://www.dbmail.org/download/3.1/dbmail-${pkgver}.tar.gz" "dbmail-imapd.xinetd" "dbmail-lmtpd.xinetd" "dbmail-pop3d.xinetd" "dbmail-timsieved.xinetd" "dbmail-6-sieve.patch::http://git.dbmail.eu/paul/dbmail/patch/?id=92b98094a01eda5efe3ba3080e529482d08945a2" "dbmail-7-systemd.diff") md5sums=('67f119c18551de066fc90086847d24d3' '890de13361afbdf4fed12d6d7eb53e66' '961593658cd596297d03d25eb9c9e98f' '4cb764894abd3914802e90602bf90a0c' 'e78dc86355f9aaf24590bc7c6611162f' 'b1063893dd0e74bc0ddee454bb65bf01' 'a781a4ebe2dd75ed635c9b4a239b38d8') prepare() { cd $srcdir/dbmail-${pkgver}/ patch -p1 <$srcdir/dbmail-6-sieve.patch patch -Rp1 <$srcdir/dbmail-7-systemd.diff aclocal automake --add-missing autoreconf } build() { cd $srcdir/dbmail-${pkgver}/ automake [ -f Makefile ] || ./configure \ --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc \ --with-ldap --with-sieve \ --enable-systemd --enable-manpages make } package() { cd $srcdir/dbmail-${pkgver}/ make DESTDIR=$pkgdir install install -Dm644 dbmail.conf $pkgdir/etc/dbmail.conf.sample mkdir $pkgdir/usr/share/dbmail cp -r sql/* $pkgdir/usr/share/dbmail/ cp -a contrib $pkgdir/usr/share/dbmail/ cp dbmail.schema $pkgdir/usr/share/dbmail/ for i in dbmail-imapd dbmail-lmtpd dbmail-pop3d dbmail-timsieved; do install -Dm0644 $srcdir/$i.xinetd $pkgdir/etc/xinetd.d/$i done }