CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
msmtp: moved from core collection
[attic/ports/opt-cross.git] / dovecot / Pkgfile
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 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on: zlib bzip2 openssl tcp_wrappers libcap
6
7 name=dovecot
8 version=2.0.7
9 release=1
10 source=(http://dovecot.org/releases/2.0/$name-$version.tar.gz \
11 dovecot-config.patch dovecot)
12
13 build () {
14 cd $name-$version
15
16 patch -p1 -i $SRC/$name-config.patch
17
18 echo "i_cv_epoll_works=no" > config.cache
19 echo "i_cv_inotify_works=no" >> config.cache
20 echo "i_cv_posix_fallocate_works=yes" >> config.cache
21 echo "i_cv_signed_size_t=no" >> config.cache
22 echo "i_cv_gmtime_max_time_t=32" >> config.cache
23 echo "i_cv_signed_time_t=yes" >> config.cache
24 echo "i_cv_mmap_plays_with_write=yes" >> config.cache
25 echo "i_cv_fd_passing=yes" >> config.cache
26 echo "i_cv_c99_vsnprintf=yes" >> config.cache
27 echo "lib_cv_va_copy=yes" >> config.cache
28 echo "lib_cv___va_copy=yes" >> config.cache
29 echo "lib_cv_va_val_copy=yes" >> config.cache
30
31 ./configure --build=$CHOST \
32 --host=$CTARGET \
33 --prefix=/usr \
34 --libexecdir=/usr/lib \
35 --sysconfdir=/etc \
36 --localstatedir=/var \
37 --mandir=/usr/man \
38 --with-moduledir=/usr/lib/dovecot/modules \
39 --with-ssl=openssl \
40 --with-libwrap \
41 --cache-file=config.cache
42
43 sed -i config.h -e '/HAVE_FALLOCATE 1/d'
44
45 make
46 make DESTDIR=$PKG install
47
48 cp -r $PKG/usr/share/doc/dovecot/example-config/* $PKG/etc/dovecot
49 install -D -m 755 $SRC/dovecot $PKG/etc/rc.d/dovecot
50
51 rm -r $PKG/usr/share/doc
52 rm $PKG/etc/dovecot/README
53
54 install -d $PKG/etc/ssl/{certs,keys}
55 touch $PKG/etc/ssl/certs/dovecot.crt
56 touch $PKG/etc/ssl/keys/dovecot.key
57 chmod 0600 $PKG/etc/ssl/{keys/dovecot.key,certs/dovecot.crt}
58
59 install -d -m 0750 $PKG/var/lib/dovecot
60 install -d -m 0755 $PKG/var/run/dovecot
61 install -d -m 0750 -o root -g dovecot $PKG/var/run/dovecot/login
62 }