1 # Description: IMAP and POP3 server with ssl/ipv6 support, written with security primarily in mind
2 # URL: http://dovecot.org
3 # Maintainer: Juergen Daubert, juergen dot daubert at t-online dot de
4 # Depends on: zlib bzip2 openssl tcp_wrappers libcap
9 source=(http://dovecot.org/releases/2.0/$name-$version.tar.gz \
10 dovecot-config.patch dovecot)
15 patch -p1 -i $SRC/$name-config.patch
17 echo "i_cv_epoll_works=no" > config.cache
18 echo "i_cv_inotify_works=no" >> config.cache
19 echo "i_cv_posix_fallocate_works=yes" >> config.cache
20 echo "i_cv_signed_size_t=no" >> config.cache
21 echo "i_cv_gmtime_max_time_t=32" >> config.cache
22 echo "i_cv_signed_time_t=yes" >> config.cache
23 echo "i_cv_mmap_plays_with_write=yes" >> config.cache
24 echo "i_cv_fd_passing=yes" >> config.cache
25 echo "i_cv_c99_vsnprintf=yes" >> config.cache
26 echo "lib_cv_va_copy=yes" >> config.cache
27 echo "lib_cv___va_copy=yes" >> config.cache
28 echo "lib_cv_va_val_copy=yes" >> config.cache
30 ./configure --build=$CHOST \
33 --libexecdir=/usr/lib \
35 --localstatedir=/var \
37 --with-moduledir=/usr/lib/dovecot/modules \
40 --cache-file=config.cache
42 sed -i config.h -e '/HAVE_FALLOCATE 1/d'
45 make DESTDIR=$PKG install
47 cp -r $PKG/usr/share/doc/dovecot/example-config/* $PKG/etc/dovecot
48 install -D -m 755 $SRC/dovecot $PKG/etc/rc.d/dovecot
50 rm -r $PKG/usr/share/doc
51 rm $PKG/etc/dovecot/README
53 install -d $PKG/etc/ssl/{certs,keys}
54 touch $PKG/etc/ssl/certs/dovecot.crt
55 touch $PKG/etc/ssl/keys/dovecot.key
56 chmod 0600 $PKG/etc/ssl/{keys/dovecot.key,certs/dovecot.crt}
58 install -d -m 0750 $PKG/var/lib/dovecot
59 install -d -m 0755 $PKG/var/run/dovecot
60 install -d -m 0750 -o root -g dovecot $PKG/var/run/dovecot/login