### this file is sourced not run
PKGVER=2.2.21
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS post-7.8 2016-01-22
TARBALL=dovecot-$PKGVER.tar.gz
MD5SUM=28c39ab78a20f00701c26960d9190cf0
SRC_URL=http://www.dovecot.org/releases/2.2/$TARBALL
BUNDLE=

SLACKREQ='sqlite3 openssl libclucene'
SLACKDESC="dovecot: dovecot $PKGVER (IMAP/POP3 server)  
dovecot:  
dovecot: Dovecot is an Internet Message Access Protocol (IMAP) and Post Office 
dovecot: Protocol (POP) server, written primarily with security in mind. 
dovecot: Dovecot aims to be lightweight, fast and easy to set up as well as 
dovecot: highly configurable and easily extensible with plugins.  
dovecot: 
dovecot: 
dovecot: 
dovecot: 
dovecot:
"
SLACKSUG='postgresql'
SLACKINSTALL='
! grep -q dovecot  ./etc/passwd && echo "dovecot:x:42:42:Dovecot unprivileged user,,,:/dev/null:/bin/false" >> ./etc/passwd
! grep -q dovecot  ./etc/group  && echo "dovecot:x:42" >> ./etc/group
! grep -q dovenull ./etc/passwd && echo "dovenull:x:43:43:Dovecot login user,,,:/dev/null:/bin/false" >> ./etc/passwd
! grep -q dovenull ./etc/group  && echo "dovenull:x:43" >> ./etc/group
'


### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	echo "dovecot:x::42:Dovecot unprivileged user,,,:/dev/null:/bin/false" >> /etc/passwd
	echo "dovecot:x:42 >> /etc/group
	echo "dovenull:x::42:Dovecot login user,,,:/dev/null:/bin/false" >> /etc/passwd
	echo "dovenull:x:43 >> /etc/group

	CONFFLAGS="$CONFFLAGS --docdir=/usr/share/doc/dovecot-$PKGVER
		--disable-static --with-sqlite --without-icu --with-pgsql --with-lucene"
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	rm -f /etc/passwd /etc/group
}


