summaryrefslogtreecommitdiff
path: root/community/dbmail/PKGBUILD
blob: aac0cb88198c95f31d03d27f58e5bcfafa45cec2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# $Id: PKGBUILD 116161 2014-07-23 12:16:17Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sebastian Faltoni <sebastian.faltoni@gmail.com>

pkgname=dbmail
pkgver=3.1.16
pkgrel=2
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' 'git')
optdepends=('libldap: for LDAP authentication'
	    'libsieve: for dbmail-sieve'
	    'python2-mysql2pgsql: migrate from MySQL to PostreSQL')
url="http://www.dbmail.org"
license=('GPL')
options=('zipman')
backup=(etc/xinetd.d/dbmail-imapd
	etc/xinetd.d/dbmail-pop3d
	etc/xinetd.d/dbmail-lmtpd
	etc/xinetd.d/dbmail-timsieved)
#source=("dbmail-$pkgver::git://git.subdir.eu/paul/dbmail#branch=dbmail_3_1"
#source=("dbmail-$pkgver.tar.gz::http://git.dbmail.eu/paul/dbmail/snapshot/dbmail-$pkgver.tar.gz"
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-7-systemd.diff")
md5sums=('e5dc416766e8bf335eb394ad9748b800'
         '890de13361afbdf4fed12d6d7eb53e66'
         '961593658cd596297d03d25eb9c9e98f'
         '4cb764894abd3914802e90602bf90a0c'
         'e78dc86355f9aaf24590bc7c6611162f'
         '225d7ddcc357b4fd65e4b6a2719d0476')

prepare() {
  cd $srcdir/dbmail-${pkgver}/
  patch -Rp1 <$srcdir/dbmail-7-systemd.diff
}

build() {
  cd $srcdir/dbmail-${pkgver}/
  aclocal
  automake --add-missing
  autoreconf
  [ -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
}