/[gentoo-x86]/mail-mta/qmail-ldap/qmail-ldap-1.03-r8.ebuild
Gentoo

Contents of /mail-mta/qmail-ldap/qmail-ldap-1.03-r8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Thu Feb 28 17:53:55 2013 UTC (5 years, 6 months ago) by zx2c4
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +3 -2 lines
Block opensmtpd.

(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key A5DE03AE)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail-ldap/qmail-ldap-1.03-r8.ebuild,v 1.7 2012/11/06 11:20:22 eras Exp $
4
5 GENQMAIL_PV=20080406
6 QMAIL_SPP_PV=0.42
7
8 QMAIL_LDAP_PV=20060201
9 QMAIL_LDAP_F=${P}-${QMAIL_LDAP_PV}.patch.gz
10
11 QMAIL_LDAP_SPP_F=${P}-spp-${QMAIL_SPP_PV}.patch
12
13 QMAIL_LDAP_CONTROLS_PV=20060401d
14 QMAIL_LDAP_CONTROLS_F=${P}-${QMAIL_LDAP_PV}-controls${QMAIL_LDAP_CONTROLS_PV}.patch
15
16 inherit eutils qmail
17
18 DESCRIPTION="qmail -- a secure, reliable, efficient, simple message transfer agent"
19 HOMEPAGE="
20 http://www.qmail-ldap.org
21 http://cr.yp.to/qmail.html
22 http://qmail.org
23 "
24 SRC_URI="mirror://qmail/qmail-${PV}.tar.gz
25 http://dev.gentoo.org/~hollow/distfiles/${GENQMAIL_F}
26 http://www.nrg4u.com/qmail/${QMAIL_LDAP_F}
27 mirror://gentoo/${QMAIL_LDAP_CONTROLS_F}
28 mirror://gentoo/${P}-queue-custom-error.patch
29 !vanilla? (
30 qmail-spp? (
31 mirror://sourceforge/qmail-spp/${QMAIL_SPP_F}
32 mirror://gentoo/${QMAIL_LDAP_SPP_F}
33 )
34 )
35 "
36
37 LICENSE="public-domain"
38 SLOT="0"
39 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
40 IUSE="cluster debug gencertdaily highvolume qmail-spp rfc2307 rfc822 ssl vanilla zlib"
41 RESTRICT="test"
42
43 DEPEND="
44 !mail-mta/qmail
45 net-nds/openldap
46 net-mail/queue-repair
47 ssl? ( dev-libs/openssl )
48 "
49 RDEPEND="
50 !mail-mta/courier
51 !mail-mta/esmtp
52 !mail-mta/exim
53 !mail-mta/mini-qmail
54 !mail-mta/msmtp
55 !mail-mta/netqmail
56 !mail-mta/nullmailer
57 !mail-mta/postfix
58 !mail-mta/sendmail
59 !mail-mta/opensmtpd
60 !mail-mta/ssmtp
61 >=sys-apps/ucspi-tcp-0.88-r17
62 ssl? ( >=sys-apps/ucspi-ssl-0.70-r1 )
63 virtual/daemontools
64 >=net-mail/dot-forward-0.71-r3
65 ${DEPEND}
66 "
67
68 S="${WORKDIR}"/qmail-${PV}
69
70 pkg_setup() {
71 if [[ -n "${QMAIL_PATCH_DIR}" ]]; then
72 eerror
73 eerror "The QMAIL_PATCH_DIR variable for custom patches"
74 eerror "has been removed from ${PN}. If you need custom patches"
75 eerror "you should create a copy of this ebuild in an overlay."
76 eerror
77 die "QMAIL_PATCH_DIR is not supported anymore"
78 fi
79
80 qmail_create_users
81 }
82
83 src_unpack() {
84 genqmail_src_unpack
85 use qmail-spp && qmail_spp_src_unpack
86
87 unpack qmail-${PV}.tar.gz
88
89 cd "${S}"
90
91 # main ldap patch
92 # includes: netqmail-1.05, EXTTODO, BIGTODO, TLS/SMTPAUTH, 0.0.0.0 fix
93 epatch "${DISTDIR}"/${QMAIL_LDAP_F}
94
95 # QmailLDAP/Controls patch
96 # includes: RFC2307/822 fixes
97 epatch "${DISTDIR}"/${QMAIL_LDAP_CONTROLS_F}
98 epatch "${FILESDIR}"/${PV}-warnings.patch
99
100 # fix libraries for controls patch
101 sed -i -e 's|NEWLDAPPROGLIBS=.*|& str.a|' Makefile
102
103 ht_fix_file Makefile*
104
105 if ! use vanilla; then
106 # Add custom bounce messages to qmail-queue
107 epatch "${DISTDIR}"/${P}-queue-custom-error.patch
108
109 # qmail-spp patch
110 use qmail-spp && epatch "${DISTDIR}"/${QMAIL_LDAP_SPP_F}
111 fi
112
113 # makefile options
114 local INCLUDES="-I/usr/include"
115 local LDAPLIBS="-L/usr/lib -lldap -llber"
116 local LDAPFLAGS="-DALTQUEUE -DEXTERNAL_TODO -DDASH_EXT -DSMTPEXECCHECK"
117 local CONTROLDB="-DUSE_CONTROLDB -DQLDAP_BAILOUT"
118 local SECUREBIND= RFCFLAGS=
119
120 use cluster && LDAPFLAGS="${LDAPFLAGS} -DQLDAP_CLUSTER"
121 use highvolume && LDAPFLAGS="${LDAPFLAGS} -DBIGTODO"
122 use zlib && LDAPFLAGS="${LDAPFLAGS} -DDATA_COMPRESS -D QMQP_COMPRESS"
123
124 use rfc2307 && RFCFLAGS="${RFCFLAGS} -DUSE_RFC2307"
125 use rfc822 && RFCFLAGS="${RFCFLAGS} -DUSE_RFC822"
126
127 use ssl && SECUREBIND="-DSECUREBIND_TLS -DSECUREBIND_SSL"
128
129 # a lot of sed magic to get Makefile right
130 local EXP=
131
132 EXP="${EXP} s|^#LDAPINCLUDES=.*|LDAPINCLUDES=${INCLUDES}|;"
133 EXP="${EXP} s|^#LDAPLIBS=.*|LDAPLIBS=${LDAPLIBS}|;"
134 EXP="${EXP} s|^#LDAPFLAGS=.*|LDAPFLAGS=${LDAPFLAGS}|;"
135
136 EXP="${EXP} s|^#CONTROLDB=.*|CONTROLDB=${CONTROLDB}|;"
137 EXP="${EXP} s|^#RFCFLAGS=.*|RFCFLAGS=${RFCFLAGS}|;"
138 EXP="${EXP} s|^#SECUREBIND=.*|SECUREBIND=${SECUREBIND}|;"
139
140 # TODO: do we even need this with LDAP?
141 EXP="${EXP} s|^#SHADOWLIBS=.*|SHADOWLIBS=-lcrypt|;"
142
143 # automagic maildir creation
144 EXP="${EXP} s|^#\(MDIRMAKE=.*\)|\1|;"
145 EXP="${EXP} s|^#\(HDIRMAKE=.*\)|\1|;"
146
147 use debug && EXP="${EXP} s|^#\(DEBUG=.*\)|\1|;"
148 use zlib && EXP="${EXP} s|^#ZLIB=.*|ZLIB=-lz|;"
149
150 if use ssl; then
151 EXP="${EXP} s|^#\(TLS=.*\)|\1|;"
152 EXP="${EXP} s|^#TLSINCLUDES=.*|TLSINCLUDES=${INCLUDES}|;"
153 EXP="${EXP} s|^#TLSLIBS=.*|TLSLIBS=-L/usr/lib -lssl -lcrypto|;"
154 EXP="${EXP} s|^#OPENSSLBIN=.*|OPENSSLBIN=/usr/bin/openssl|;"
155 fi
156
157 qmail_src_postunpack
158
159 sed -i -e "${EXP}" Makefile || die "could not patch Makefile"
160 }
161
162 src_compile() {
163 qmail_src_compile ldap
164 use qmail-spp && qmail_spp_src_compile
165 }
166
167 qmail_full_install_hook() {
168 insinto ${QMAIL_HOME}/bin
169 insopts -o root -g qmail -m 0755
170 doins auth_smtp condwrite digest dirmaker pbs{add,check,dbd} \
171 qmail-{forward,group,quotawarn,reply,secretary,verify}
172
173 insopts -o root -g root -m 0750
174 doins qmail-ldaplookup
175
176 insopts -o root -g qmail -m 0711
177 doins qmail-todo
178
179 insopts -o root -g qmail -m 0700
180 doins auth_{imap,pop} qmail-cdb
181 }
182
183 qmail_man_install_hook() {
184 dodoc EXTTODO POPBEFORESMTP QLDAP* "${FILESDIR}"/samples.ldif
185 }
186
187 qmail_config_install_hook() {
188 einfo "Installing OpenLDAP schema"
189 insinto /etc/openldap/schema
190 doins qmail.schema qmail-ldap-control/qmailControl.schema
191 }
192
193 src_install() {
194 qmail_src_install
195 }
196
197 pkg_postinst() {
198 qmail_queue_setup
199 qmail_rootmail_fixup
200 qmail_tcprules_build
201
202 qmail_config_notice
203 qmail_supervise_config_notice
204 elog
205 elog "If you are looking for documentation, check those links:"
206 elog "http://www.lifewithqmail.com/ldap/"
207 elog " -- Life with qmail-ldap"
208 elog
209 elog "For sample ldifs, please check /usr/share/doc/${PF}/"
210 elog
211 }
212
213 pkg_preinst() {
214 qmail_tcprules_fixup
215 }
216
217 pkg_config() {
218 # avoid some weird locale problems
219 export LC_ALL=C
220
221 qmail_config_fast
222 qmail_tcprules_config
223 qmail_tcprules_build
224
225 use ssl && qmail_ssl_generate
226 }

  ViewVC Help
Powered by ViewVC 1.1.20