summaryrefslogtreecommitdiff
path: root/community/dbmail/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/dbmail/PKGBUILD')
-rw-r--r--community/dbmail/PKGBUILD67
1 files changed, 67 insertions, 0 deletions
diff --git a/community/dbmail/PKGBUILD b/community/dbmail/PKGBUILD
new file mode 100644
index 000000000..9610e41c8
--- /dev/null
+++ b/community/dbmail/PKGBUILD
@@ -0,0 +1,67 @@
+# $Id: PKGBUILD 42470 2011-03-16 21:11:47Z jelle $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Sebastian Faltoni <sebastian.faltoni@gmail.com>
+
+pkgname=dbmail
+pkgver=2.2.17
+pkgrel=2
+pkgdesc="Fast and scalable sql based mail services"
+arch=('i686' 'x86_64')
+# mhash libevent libzdb
+depends=('gmime22')
+makedepends=('asciidoc' 'xmlto' 'docbook-xsl' 'docbook-xml' 'postgresql-libs>=8.4.1' 'sqlite3' 'libmysqlclient' 'libldap>=2.4.18' 'libsieve')
+optdepends=('postgresql-libs: for PostgreSQL storage backend'
+ 'sqlite3: for SQLite storage backend'
+ 'libmysqlclient: for MySQL storage backend'
+ 'libldap: for LDAP authentication'
+ 'libsieve: for dbmail-sieve')
+url="http://www.dbmail.org"
+license=('GPL')
+options=('!libtool' 'zipman')
+backup=(etc/conf.d/dbmail)
+source=(http://www.dbmail.org/download/2.2/$pkgname-${pkgver}.tar.gz \
+ dbmail.conf.d \
+ dbmail.rc.d)
+md5sums=('20d90596d6aea066e701a6cb91445a39'
+ 'e7f72bc360decdb2475266391ad12329'
+ '099225611da20ec194c092ac9befc33c')
+
+build() {
+ cd $srcdir/$pkgname-${pkgver}/
+
+# Uncoment this if you want pam authentication
+# patch -p1 <$srcdir/dbmail-2.2.10-pam-support.patch
+# automake
+# autoconf
+
+# Apply these patches if you want to use MySQL 5.1.* < 5.1.47
+# See MySQL bug: http://bugs.mysql.com/bug.php?id=38745
+if false; then
+ patch -p0 dbmail-message.c <<EOF
+744c744
+< "FROM %smessageblks "
+---
+> "FROM %smessageblks use index(physmessage_id_index) "
+EOF
+ patch -p0 db.c <<EOF
+2139c2139
+< "SELECT message_idnr FROM %smessages "
+---
+> "SELECT message_idnr FROM %smessages use index(mailbox_idnr_index) "
+EOF
+fi
+
+ ./configure --prefix=/usr --with-mysql --with-pgsql --with-sqlite --with-ldap --with-sieve
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+
+ (cd man && make && make install DESTDIR=$pkgdir) || return 1
+
+ mkdir $pkgdir/etc && \
+ install -Dm644 dbmail.conf $pkgdir/etc/dbmail.conf.sample && \
+ install -Dm644 ../${pkgname}.conf.d $pkgdir/etc/conf.d/${pkgname} && \
+ install -Dm755 ../${pkgname}.rc.d $pkgdir/etc/rc.d/${pkgname} && \
+ mkdir $pkgdir/usr/share/dbmail && \
+ cp -r sql/* $pkgdir/usr/share/dbmail/ && \
+ cp dbmail.schema $pkgdir/usr/share/dbmail/
+}