diff options
-rw-r--r-- | network/dovecot/README | 10 | ||||
-rw-r--r-- | network/dovecot/doinst.sh | 20 | ||||
-rw-r--r-- | network/dovecot/dovecot.SlackBuild | 66 | ||||
-rw-r--r-- | network/dovecot/dovecot.info | 8 |
4 files changed, 46 insertions, 58 deletions
diff --git a/network/dovecot/README b/network/dovecot/README index 52b3c6b69fcca..ea7c968be5e5c 100644 --- a/network/dovecot/README +++ b/network/dovecot/README @@ -1,17 +1,15 @@ This script builds dovecot with support for SSL. As such, you must have openssl installed - openssl-solibs is not enough in itself to meet this requirement. Additionally, dovecot will be compiled with POP3 support. -Unfortunately, dovecot does not have a man page at this time, so you'll -have to find your documentation elsewhere. A few examples are included -in /usr/doc/dovecot-$VERSION. The dovecot team operates a wiki that may -prove useful: http://wiki.dovecot.org You should create a dovecot user to run the login processes on your server. +Something like this should work: +[root@host] # groupadd -g 202 dovecot +[root@host] # useradd -d /dev/null -s /bin/false -u 202 -g 202 dovecot From the dovecot-new release posting comes this word of advice: - Remember to read http://wiki2.dovecot.org/Upgrading/2.0 before upgrading from v1.x. Although there is automatic config conversion, it can't handle everything, so reserve some extra time for upgrading. - +See the documentation in /usr/doc/dovecot-*/ to get started. diff --git a/network/dovecot/doinst.sh b/network/dovecot/doinst.sh index 088bd4ecc8d3b..f39fc6ebd424e 100644 --- a/network/dovecot/doinst.sh +++ b/network/dovecot/doinst.sh @@ -10,13 +10,15 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } - -# Keep same perms on rc.dovecot.new: -if [ -e etc/rc.d/rc.dovecot ]; then - cp -a etc/rc.d/rc.dovecot etc/rc.d/rc.dovecot.new.incoming - cat etc/rc.d/rc.dovecot.new > etc/rc.d/rc.dovecot.new.incoming - mv etc/rc.d/rc.dovecot.new.incoming etc/rc.d/rc.dovecot.new -fi - -config etc/rc.d/rc.dovecot.new +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} +preserve_perms etc/rc.d/rc.dovecot.new diff --git a/network/dovecot/dovecot.SlackBuild b/network/dovecot/dovecot.SlackBuild index 51114504c01bf..b1fa366c2dcb3 100644 --- a/network/dovecot/dovecot.SlackBuild +++ b/network/dovecot/dovecot.SlackBuild @@ -20,42 +20,36 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PRGNAM="dovecot" -VERSION="2.0.0" +PRGNAM=dovecot +VERSION=2.0.8 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -PKG="$TMP/package-$PRGNAM" +PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -# Build with mysql database by default, sqlite/mysql/postgresql are supported -DATABASE=${DATABASE:-mysql} -case "$DATABASE" in - pgsql) DATABASE="--with-pgsql" ;; - mysql) DATABASE="--with-mysql" ;; - sqlite) DATABASE="--with-sqlite" ;; - *) DATABASE="" ;; -esac - -# Bail if user isn't valid on your system -if ! grep -q ^dovecot: /etc/passwd ; then - echo " You must have a dovecot user to run this script." +bailout() { + echo " You must have a dovecot user and group to build and/or use dovecot:" echo " # groupadd -g 202 dovecot" echo " # useradd -d /dev/null -s /bin/false -u 202 -g 202 dovecot" - echo " Or something similar." exit 1 +} + +# Bail if user isn't valid on your system +if ! getent group dovecot 1>/dev/null 2>/dev/null ; then + bailout +elif ! getent passwd dovecot 1>/dev/null 2>/dev/null ; then + bailout fi set -e @@ -83,44 +77,38 @@ cd $PRGNAM-$VERSION chmod -R a-s,u+w,go+r-w . chown -R root:root . +# Add -ldl to LDFLAGS for sqlite CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ +LDFLAGS="-ldl" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --docdir=/usr/doc/$PRGNAM-$VERSION \ - --enable-header-install \ + --mandir=/usr/man \ --with-notify=inotify \ --without-pam \ - --with-pop3d \ + --with-mysql \ + --with-sqlite \ + --with-libcap \ --disable-static \ - --build=$ARCH-slackware-linux \ - $DATABASE + --build=$ARCH-slackware-linux make make install-strip DESTDIR=$PKG -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING COPYING.LGPL COPYING.MIT ChangeLog INSTALL NEWS \ - README TODO doc/* $PKG/usr/doc/$PRGNAM-$VERSION/ -cat $CWD/dovecot.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/dovecot.SlackBuild -rm -rf $PKG/usr/share/doc -find $PKG/usr/doc -type f \( -name "Makefile*" -o -name "*.in" \) -delete - -# Place a default conf file in /etc -cat $PKG/usr/doc/dovecot-2.0.0/example-config/dovecot.conf > \ - $PKG/etc/dovecot/dovecot.conf +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.dovecot > $PKG/etc/rc.d/rc.dovecot.new +chmod 0755 $PKG/etc/rc.d/rc.dovecot.new -# Handle man pages -mv $PKG/usr/share/man $PKG/usr/man -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +gzip -9 $PKG/usr/man/man?/*.? -# Add an init script -mkdir -p $PKG/etc/rc.d -install -m 0755 $CWD/rc.dovecot $PKG/etc/rc.d/rc.dovecot.new +cp -a \ + AUTHORS COPYING* ChangeLog NEWS README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION/ +cat $CWD/dovecot.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/dovecot.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/network/dovecot/dovecot.info b/network/dovecot/dovecot.info index 656be7a1cabee..4e40b6dd5e260 100644 --- a/network/dovecot/dovecot.info +++ b/network/dovecot/dovecot.info @@ -1,10 +1,10 @@ PRGNAM="dovecot" -VERSION="2.0.0" +VERSION="2.0.8" HOMEPAGE="http://www.dovecot.org/" -DOWNLOAD="http://dovecot.org/releases/2.0/dovecot-2.0.0.tar.gz" -MD5SUM="2ca3cbd523cac1cbd53a904255dcd4f8" +DOWNLOAD="http://www.dovecot.org/releases/2.0/dovecot-2.0.8.tar.gz" +MD5SUM="01b1c193469dfd14bf026a1516bea30c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Alan Hicks" EMAIL="alan@lizella.net" -APPROVED="dsomero" +APPROVED="rworkman" |