wok-current rev 12060

Up: dovecot (2.1.1) + improve receipt
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Thu Mar 08 14:32:42 2012 +0100 (2012-03-08)
parents 8ed3888d6736
children c852487e5f13
files dovecot/receipt dovecot/stuff/init.d/dovecot
line diff
     1.1 --- a/dovecot/receipt	Wed Mar 07 22:30:33 2012 -0800
     1.2 +++ b/dovecot/receipt	Thu Mar 08 14:32:42 2012 +0100
     1.3 @@ -1,13 +1,13 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="dovecot"
     1.7 -VERSION="1.2.17"
     1.8 +VERSION="2.1.1"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Dovecot IMAP and POP3 Server."
    1.11  MAINTAINER="l.lemarinel@gmail.com"
    1.12  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.13  WEB_SITE="www.dovecot.org"
    1.14 -WGET_URL="http://www.dovecot.org/releases/1.2/$TARBALL"
    1.15 +WGET_URL="http://www.dovecot.org/releases/${VERSION%.*}/$TARBALL"
    1.16  BUILD_DEPENDS="openssl-dev libcap-dev openldap-dev \
    1.17   libmysqlclient mysql-dev sqlite-dev pam-dev postgresql-dev"
    1.18  DEPENDS="libssl libcap"
    1.19 @@ -18,7 +18,8 @@
    1.20  {
    1.21  	cd $src
    1.22  	./configure  --prefix=/usr \
    1.23 -		--sysconfdir=/etc/dovecot \
    1.24 +		--sysconfdir=/etc \
    1.25 +		--localstatedir=/var \
    1.26  		--libexecdir=/usr/lib/$PACKAGE \
    1.27  		--with-ssl=openssl \
    1.28  		--with-ldap=plugin \
    1.29 @@ -27,8 +28,8 @@
    1.30  		--with-pgsql \
    1.31  		--with-sqlite \
    1.32  		$CONFIGURE_ARGS &&
    1.33 -	make &&
    1.34 -	make DESTDIR=$DESTDIR install
    1.35 +	make && make install
    1.36 +#	make DESTDIR=$DESTDIR install
    1.37  	
    1.38  }
    1.39  
    1.40 @@ -37,20 +38,40 @@
    1.41  {
    1.42  	mkdir -p $fs/usr/lib \
    1.43  		$fs/var/log/dovecot \
    1.44 -		$fs/var/run/dovecot 
    1.45 -
    1.46 +		$fs/var/run/dovecot \
    1.47 +		$fs/etc/ssl/misc
    1.48 +		
    1.49  	
    1.50  	cp -a $install/usr/sbin $fs/usr
    1.51 +	cp -a $install/usr/bin $fs/usr
    1.52  	cp -a $install/usr/lib $fs/usr
    1.53  	cp -a $install/etc $fs/
    1.54  	
    1.55  	cp -pa $stuff/init.d $fs/etc
    1.56  
    1.57 -	cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf
    1.58 +	#cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf
    1.59 +	cp -pa $install/usr/share/doc/dovecot/example-config/* $fs/etc/dovecot/
    1.60 +	#cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d
    1.61 +	#cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d
    1.62 +	cp -pa $src/doc/*.cnf $fs/etc/ssl
    1.63 +	cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh
    1.64  	
    1.65  	# Remove archive file *.*a
    1.66  	find $fs -name "*.*a" -exec rm -f {} \;
    1.67  	
    1.68 +	# Fix perms
    1.69 +	chmod 755 $fs/etc/ssl/misc/*
    1.70 +	
    1.71 +	# Customising config.
    1.72 +	sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M"/ \
    1.73 +		$fs/etc/dovecot/conf.d/10-master.conf
    1.74 +	
    1.75 +	
    1.76 +	sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log"! \
    1.77 +		$fs/etc/dovecot/conf.d/10-logging.conf
    1.78 +	
    1.79 +	sed -i -e "s/^#listen.*/listen = *"/ \
    1.80 +		$fs/etc/dovecot/dovecot.conf
    1.81  }
    1.82  
    1.83  #nd post install commands for Tazpkg.
    1.84 @@ -66,6 +87,7 @@
    1.85  		echo -n "Adding user/group $user..."
    1.86  		chroot $1/ addgroup -S $group
    1.87  		chroot $1/ adduser -S -D -H -G $group $user
    1.88 +		chroot $1/ adduser -S -D -H -G nogroup dovenull 
    1.89  		status
    1.90  	fi
    1.91  	
    1.92 @@ -94,4 +116,5 @@
    1.93  	
    1.94  	echo "Removing user/group daemon"
    1.95  	deluser dovecot 
    1.96 +	deluser dovenull
    1.97  }
     2.1 --- a/dovecot/stuff/init.d/dovecot	Wed Mar 07 22:30:33 2012 -0800
     2.2 +++ b/dovecot/stuff/init.d/dovecot	Thu Mar 08 14:32:42 2012 +0100
     2.3 @@ -12,7 +12,7 @@
     2.4  DESC="Dovecot daemon"
     2.5  DAEMON=/usr/sbin/dovecot
     2.6  OPTIONS=$dovecot_OPTIONS
     2.7 -PIDFILE=/var/run/dovecot/dovecot.pid
     2.8 +PIDFILE=/var/run/dovecot/master.pid
     2.9  
    2.10  case "$1" in
    2.11    start)