Commit | Line | Data |
---|---|---|
ec9e1b09 JB |
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 | |
5 | ||
6 | name=dovecot | |
7 | version=2.0.7 | |
8 | release=1 | |
9 | source=(http://dovecot.org/releases/2.0/$name-$version.tar.gz \ | |
10 | dovecot-config.patch dovecot) | |
11 | ||
12 | build () { | |
13 | cd $name-$version | |
14 | ||
15 | patch -p1 -i $SRC/$name-config.patch | |
16 | ||
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 | |
29 | ||
30 | ./configure --build=$CHOST \ | |
31 | --host=$CTARGET \ | |
32 | --prefix=/usr \ | |
33 | --libexecdir=/usr/lib \ | |
34 | --sysconfdir=/etc \ | |
35 | --localstatedir=/var \ | |
36 | --mandir=/usr/man \ | |
37 | --with-moduledir=/usr/lib/dovecot/modules \ | |
38 | --with-ssl=openssl \ | |
39 | --with-libwrap \ | |
40 | --cache-file=config.cache | |
41 | ||
42 | sed -i config.h -e '/HAVE_FALLOCATE 1/d' | |
43 | ||
44 | make | |
45 | make DESTDIR=$PKG install | |
46 | ||
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 | |
49 | ||
50 | rm -r $PKG/usr/share/doc | |
51 | rm $PKG/etc/dovecot/README | |
52 | ||
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} | |
57 | ||
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 | |
61 | } |