summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Preksavec <mario@slackware.hr>2016-07-24 19:10:49 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-07-30 08:28:21 +0700
commitd93d36c4b10938ec28b219b79027b1cfef947765 (patch)
treea2c6ec90133b4347b7ed3548542bb2ccb536be01
parent6c7a72a0702e7733c263506b1f4b8a3b462378d5 (diff)
downloadslackbuilds-d93d36c4b10938ec28b219b79027b1cfef947765.tar.gz
network/dovecot: Added PostgreSQL support.
Signed-off-by: Mario Preksavec <mario@slackware.hr>
-rw-r--r--network/dovecot/README6
-rw-r--r--network/dovecot/dovecot.SlackBuild8
2 files changed, 12 insertions, 2 deletions
diff --git a/network/dovecot/README b/network/dovecot/README
index 16e081ed54..3373c69d34 100644
--- a/network/dovecot/README
+++ b/network/dovecot/README
@@ -9,4 +9,8 @@ installed - openssl-solibs is not enough in itself to meet this requirement.
This script doesn't add dovecot users and groups, instead it offers sane defaults
that won't conflict with system users and groups, and other scripts from the SBo.
-See the documentation in /usr/doc/dovecot-2.2.19/ to get started.
+By default, MySQL database is selected, switch to PostgreSQL with:
+
+ DATABASE=pgsql ./dovecot.SlackBuild
+
+See the documentation in /usr/doc/dovecot-*/ to get started.
diff --git a/network/dovecot/dovecot.SlackBuild b/network/dovecot/dovecot.SlackBuild
index aa5395bc27..99602e6682 100644
--- a/network/dovecot/dovecot.SlackBuild
+++ b/network/dovecot/dovecot.SlackBuild
@@ -39,6 +39,12 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+# Build with MySQL database support by default
+case $DATABASE in
+ pgsql) : ;;
+ *) DATABASE=mysql ;;
+esac
+
bailout() {
echo " You must have both dovecot and dovenull users and groups:"
echo " # groupadd -g 202 dovecot"
@@ -97,7 +103,7 @@ LDFLAGS="-ldl" \
--mandir=/usr/man \
--with-notify=inotify \
--without-pam \
- --with-mysql \
+ --with-$DATABASE \
--with-sqlite \
--with-libcap \
--disable-static \