Contents of /trunk/todo/dovecot/dovecot-1.0.13-r1.smage2
Parent Directory | Revision Log
Revision 2241 -
(show annotations)
(download)
Thu Jul 9 19:26:10 2009 UTC (15 years, 2 months ago) by niro
File size: 2837 byte(s)
Thu Jul 9 19:26:10 2009 UTC (15 years, 2 months ago) by niro
File size: 2837 byte(s)
-moved to 'todo'
1 | # $Header: /magellan-cvs/smage/dovecot/dovecot-1.0.13-r1.smage2,v 1.1 2008/03/17 16:36:11 niro Exp $ |
2 | |
3 | PNAME="dovecot" |
4 | PVER="1.0.13" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="net-mail" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="Dovecot is an IMAP and POP3 server written with security primarily in mind." |
11 | HOMEPAGE="http://dovecot.org/" |
12 | |
13 | DEPEND=">= net-mail/mail-base-files-0.1 |
14 | >= sys-libs/pam-0.99 |
15 | >= dev-libs/openssl-0.9.8 |
16 | >= net-nds/openldap-2.4 |
17 | >= dev-db/mysql5-5" |
18 | |
19 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
20 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
21 | |
22 | sminclude mtools |
23 | |
24 | SRC_URI=( |
25 | http://dovecot.org/releases/${PVER%.*}/${SRCFILE} |
26 | mirror://${PNAME}/${SRCFILE} |
27 | mirror://${PNAME}/dovecot.rc |
28 | mirror://${PNAME}/${PNAME}-1.0.5-magellan-defaults.patch |
29 | mirror://${PNAME}/${PNAME}-1.0.5-config-install-2.patch |
30 | mirror://${PNAME}/${PNAME}-1.0.5-ssl-fixes.patch |
31 | ) |
32 | |
33 | src_prepare() |
34 | { |
35 | munpack ${SRCFILE} || die |
36 | cd ${SRCDIR} |
37 | |
38 | # apply out default settings |
39 | mpatch ${PNAME}-1.0.5-magellan-defaults.patch || die |
40 | |
41 | # install only devcot.conf and not any examples to /etc/dovecot |
42 | mpatch ${PNAME}-1.0.5-config-install-2.patch || die |
43 | |
44 | # fix ssl pathes in mkcert.sh to match out default settings |
45 | mpatch ${PNAME}-1.0.5-ssl-fixes.patch || die |
46 | } |
47 | |
48 | src_compile() |
49 | { |
50 | cd ${SRCDIR} |
51 | |
52 | mconfigure \ |
53 | --sysconfdir=/etc/dovecot \ |
54 | --localstatedir=/var \ |
55 | --enable-header-install \ |
56 | --enable-ipv6 \ |
57 | --disable-debug \ |
58 | --with-ioloop=best \ |
59 | --with-poll=best \ |
60 | --with-ssl=openssl \ |
61 | --with-ssldir=/etc/dovecot/ssl \ |
62 | --with-ldap \ |
63 | --with-mysql \ |
64 | --with-pam \ |
65 | || die |
66 | |
67 | mmake || die |
68 | } |
69 | |
70 | src_install() |
71 | { |
72 | cd ${SRCDIR} |
73 | mmake DESTDIR=${BINDIR} install || die |
74 | |
75 | # we're using pam files (imap and pop3) provided by mailbase |
76 | sed -i '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
77 | ${BINDIR}/etc/dovecot/dovecot.conf || die |
78 | |
79 | # install our initscript |
80 | minstallrc dovecot.rc dovecot || die |
81 | |
82 | # install ssl-cert creation script and config |
83 | minstalldir /etc/dovecot/ssl || die |
84 | minstallfile doc/dovecot-openssl.cnf /etc/dovecot/ssl/ || die |
85 | minstallexec doc/mkcert.sh /usr/libexec/dovecot/ || die |
86 | |
87 | # remove unwanted docs |
88 | rm -rf ${BINDIR}/usr/share/doc/dovecot || die |
89 | |
90 | minstalldocs AUTHORS ChangeLog COPYING* NEWS README TODO || die |
91 | minstalldocs dovecot-example.conf || die |
92 | } |
93 | |
94 | preinstall() |
95 | { |
96 | # adding proftpd user |
97 | ${MLIBDIR}/mgroupadd -o "-g 97" dovecot |
98 | ${MLIBDIR}/museradd -o "-u 97 -g dovecot -d /dev/null -s /bin/false" dovecot |
99 | } |
100 | |
101 | postinstall() |
102 | { |
103 | # generate a self-signed ssl-cert |
104 | if [[ ! -f /etc/dovecot/ssl/dovecot.pem ]] |
105 | then |
106 | SSLDIR=/etc/dovecot/ssl \ |
107 | OPENSSLCONFIG=/etc/dovecot/ssl/dovecot-openssl.cnf \ |
108 | /usr/libexec/dovecot/mkcert.sh &> /dev/null |
109 | fi |
110 | |
111 | # rebuild ssl-parametes |
112 | if [[ ! -f /var/run/dovecot/login/ssl-parameters.dat ]] |
113 | then |
114 | dovecot --build-ssl-parameters &> /dev/null |
115 | fi |
116 | |
117 | mstartservice dovecot |
118 | } |
119 | |
120 | postremove() |
121 | { |
122 | mstopservice dovecot |
123 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |