summaryrefslogtreecommitdiffstats
path: root/dovecot-managesieve
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-04-23 21:52:10 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-04-23 21:52:10 +0200
commit9d1a5d07d1b35b7d75904802e04be6544265e413 (patch)
treef94af94845e26b9d6bbd5b5b982e5979a10a1004 /dovecot-managesieve
parent5345f3d0234956f594c44a4e7ce81be042fab7ca (diff)
downloadaur-packages-9d1a5d07d1b35b7d75904802e04be6544265e413.tar.gz
aur-packages-9d1a5d07d1b35b7d75904802e04be6544265e413.tar.xz
add dovecot-managesieve
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'dovecot-managesieve')
-rw-r--r--dovecot-managesieve/PKGBUILD76
-rw-r--r--dovecot-managesieve/dovecot-managesieve.install26
-rwxr-xr-xdovecot-managesieve/dovecot.sh36
3 files changed, 138 insertions, 0 deletions
diff --git a/dovecot-managesieve/PKGBUILD b/dovecot-managesieve/PKGBUILD
new file mode 100644
index 0000000..59671d7
--- /dev/null
+++ b/dovecot-managesieve/PKGBUILD
@@ -0,0 +1,76 @@
+# Contributor: Paul Ezvan <paul@ezvan.fr>
+# Based on dovecot PKGBUILD
+
+pkgname=dovecot-managesieve
+pkgver=1.2.11
+_managesievever=0.11.11
+_dovecotvers=1.2
+_sievever=0.1.15
+pkgrel=1
+pkgdesc="An IMAP and POP3 server written with security primarily in mind with managesieve and sieve support"
+arch=('i686' 'x86_64')
+url="http://dovecot.org/"
+license=("LGPL")
+depends=('pam' 'libmysqlclient' 'postgresql-libs' 'heimdal' 'libcap' 'bzip2')
+makedepends=('dovecot')
+provides=('imap-server' 'pop3-server' "dovecot=$pkgver" "dovecot-sive=${_sievever}")
+conflicts=('dovecot')
+options=('!libtool')
+install=$pkgname.install
+source=(dovecot.sh
+ http://www.rename-it.nl/dovecot/${_dovecotvers}/dovecot-${_dovecotvers}-managesieve-${_managesievever}.tar.gz
+ http://dovecot.org/releases/$_dovecotvers/dovecot-$pkgver.tar.gz
+ http://www.rename-it.nl/dovecot/$_dovecotvers/dovecot-$pkgver-managesieve-${_managesievever}.diff.gz
+ http://www.rename-it.nl/dovecot/$_dovecotvers/dovecot-$_dovecotvers-sieve-${_sievever}.tar.gz)
+
+build() {
+ # configure and make dovecot source
+ cd $startdir/src/dovecot-$pkgver || return 1
+ # patch with managesieve support
+ patch -p1 -i $startdir/src/dovecot-$pkgver-managesieve-${_managesievever}.diff || return 1
+ # configure with openssl, mysql, and postgresql support
+ ./configure --prefix=/usr --sysconfdir=/etc/dovecot --localstatedir=/var \
+ --libexecdir=/usr/lib --with-moduledir=/usr/lib/dovecot/modules \
+ --with-db --with-mysql --with-pgsql --with-sqlite \
+ --with-ssl=openssl --with-ssldir=/etc/dovecot/ssl \
+ --with-gssapi --with-ldap=plugin --enable-header-install --with-docs || return 1
+ # build
+ make || return 1
+ # install
+ make DESTDIR=$startdir/pkg install || return 1
+ # remove empty directories for cleanliness
+ # /usr/share will usually end up empty except for documentation, but we
+ # should not rely on that to remain true, so we do it this way
+ rm -rf $startdir/pkg/usr/share/doc || return 1
+ rmdir $startdir/pkg/usr/share || return 1
+ # install the launch script
+ install -D -m755 $startdir/src/dovecot.sh $startdir/pkg/etc/rc.d/dovecot || return 1
+ # fix paths in the config example file where we have a different layout
+ sed -i 's|/usr/lib/dovecot|/usr/lib/dovecot/modules|g;
+ s|libexec|lib|g;
+ s|lib/sendmail|sbin/sendmail|g' $pkgdir/etc/dovecot/dovecot-example.conf || return 1
+
+
+ # configure dovecot sieve source
+ cd $srcdir/dovecot-${_dovecotvers}-sieve-${_sievever} || return 1
+ ./configure --prefix=/usr --with-dovecot=$srcdir/dovecot-$pkgver || return 1
+ # build
+ make || return 1
+ # install
+ make DESTDIR="$pkgdir" install || return 1
+
+ # configure dovecot managesieve plugin
+ cd $srcdir/dovecot-${_dovecotvers}-managesieve-${_managesievever} || return 1
+ ./configure --prefix=/usr --with-dovecot=$srcdir/dovecot-$pkgver \
+ --with-dovecot-sieve=$srcdir/dovecot-${_dovecotvers}-sieve-${_sievever} \
+ --libexecdir=/usr/lib || return 1
+ # build
+ make || return 1
+ # install
+ make DESTDIR="$pkgdir" install || return 1
+}
+md5sums=('d020d43eab4ded6fb379dadc570a9490'
+ '32ba8d47a3695f8514bd2c2bf7348f96'
+ 'bdac013fd57aa616ea4bdd9ac34557c6'
+ 'd773909c5da6ccab092818cf691237bd'
+ '2246fbbcf304d3ec1df0db2d091fe05a')
diff --git a/dovecot-managesieve/dovecot-managesieve.install b/dovecot-managesieve/dovecot-managesieve.install
new file mode 100644
index 0000000..5175734
--- /dev/null
+++ b/dovecot-managesieve/dovecot-managesieve.install
@@ -0,0 +1,26 @@
+# arg 1: the new package version
+post_install() {
+ if [ -z "`grep '^dovecot:' /etc/group`" ]; then
+ groupadd -g 76 dovecot >& /dev/null
+ fi
+ if [ -z "`grep '^dovecot:' /etc/passwd`" ]; then
+ useradd -u 76 -d /var/run/dovecot/login -g dovecot -s /bin/false dovecot
+ fi
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ userdel dovecot &> /dev/null
+ groupdel dovecot &> /dev/null
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/dovecot-managesieve/dovecot.sh b/dovecot-managesieve/dovecot.sh
new file mode 100755
index 0000000..b7555fe
--- /dev/null
+++ b/dovecot-managesieve/dovecot.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/dovecot`
+case "$1" in
+ start)
+ stat_busy "Starting Dovecot"
+ [ -z "$PID" ] && /usr/sbin/dovecot
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon dovecot
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Dovecot"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon dovecot
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0