Gentoo Archives: gentoo-commits

From: "Eray Aslan (eras)" <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-filter/opendkim: opendkim-2.7.1.ebuild ChangeLog
Date: Tue, 30 Oct 2012 20:38:08
Message-Id: 20121030203750.483EA21600@flycatcher.gentoo.org
1 eras 12/10/30 20:37:50
2
3 Modified: ChangeLog
4 Added: opendkim-2.7.1.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)
9
10 Revision Changes Path
11 1.50 mail-filter/opendkim/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.50&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.50&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?r1=1.49&r2=1.50
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v
20 retrieving revision 1.49
21 retrieving revision 1.50
22 diff -u -r1.49 -r1.50
23 --- ChangeLog 30 Oct 2012 12:00:42 -0000 1.49
24 +++ ChangeLog 30 Oct 2012 20:37:50 -0000 1.50
25 @@ -1,6 +1,11 @@
26 # ChangeLog for mail-filter/opendkim
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.49 2012/10/30 12:00:42 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.50 2012/10/30 20:37:50 eras Exp $
30 +
31 +*opendkim-2.7.1 (30 Oct 2012)
32 +
33 + 30 Oct 2012; Eray Aslan <eras@g.o> +opendkim-2.7.1.ebuild:
34 + Version bump
35
36 30 Oct 2012; <ago@g.o> opendkim-2.6.7-r1.ebuild:
37 Stable for amd64, wrt bug #438968
38
39
40
41 1.1 mail-filter/opendkim/opendkim-2.7.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.7.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.7.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opendkim-2.7.1.ebuild
47 ===================================================================
48 # Copyright 1999-2012 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-2.7.1.ebuild,v 1.1 2012/10/30 20:37:50 eras Exp $
51
52 EAPI=4
53 inherit eutils db-use autotools user
54
55 # for betas
56 #MY_P=${P/_b/.B}
57 #S=${WORKDIR}/${PN}-2.0.0
58 #SRC_URI="mirror://sourceforge/opendkim/${MY_P}.tar.gz"
59
60 DESCRIPTION="A milter-based application to provide DKIM signing and verification"
61 HOMEPAGE="http://opendkim.org"
62 SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
63
64 LICENSE="Sendmail-Open-Source BSD"
65 SLOT="0"
66 KEYWORDS="~amd64 ~x86"
67 IUSE="+berkdb gnutls ldap lua opendbx poll sasl +ssl static-libs unbound"
68
69 DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
70 ssl? ( >=dev-libs/openssl-0.9.8 )
71 berkdb? ( >=sys-libs/db-3.2 )
72 opendbx? ( >=dev-db/opendbx-1.4.0 )
73 lua? ( dev-lang/lua )
74 ldap? ( net-nds/openldap )
75 sasl? ( dev-libs/cyrus-sasl )
76 unbound? ( >=net-dns/unbound-1.4.1 net-dns/dnssec-root )
77 !unbound? ( net-libs/ldns )
78 gnutls? ( >=net-libs/gnutls-2.11.7 )"
79
80 RDEPEND="${DEPEND}
81 sys-process/psmisc"
82
83 REQUIRED_USE="sasl? ( ldap )"
84
85 pkg_setup() {
86 enewgroup milter
87 # mail-milter/spamass-milter creates milter user with this home directory
88 # For consistency reasons, milter user must be created here with this home directory
89 # even though this package doesn't need a home directory for this user (#280571)
90 enewuser milter -1 -1 /var/lib/milter milter
91 }
92
93 src_prepare() {
94 sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \
95 -e 's:/var/db/opendkim:/var/lib/opendkim:g' \
96 -e 's:/etc/mail:/etc/opendkim:g' \
97 -e 's:mailnull:milter:g' \
98 -e 's:^#[[:space:]]*PidFile.*:PidFile /var/run/opendkim/opendkim.pid:' \
99 opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \
100 stats/opendkim-reportstats || die
101
102 sed -i -e 's:dist_doc_DATA:dist_html_DATA:' libopendkim/docs/Makefile.am \
103 || die
104
105 # don't go over the sock length and fail
106 sed -i -e '/^sock/s/t-sign-ss-macro-value-file.sock/t-s-s-m-v-f.sock/' \
107 opendkim/tests/t-sign-ss-macro-value-file.lua || die
108
109 eautoreconf
110 }
111
112 src_configure() {
113 local myconf
114 if use berkdb ; then
115 myconf=$(db_includedir)
116 myconf="--with-db-incdir=${myconf#-I}"
117 myconf+=" --enable-popauth"
118 myconf+=" --enable-query_cache"
119 myconf+=" --enable-stats"
120 fi
121 if use unbound; then
122 myconf+=" --with-unbound"
123 else
124 myconf+=" --with-ldns"
125 fi
126 if use ldap; then
127 myconf+=" $(use_with sasl)"
128 fi
129 econf \
130 $(use_with berkdb db) \
131 $(use_with opendbx odbx) \
132 $(use_with lua) \
133 $(use_enable lua rbl) \
134 $(use_with ldap openldap) \
135 $(use_enable poll) \
136 $(use_enable static-libs static) \
137 $(use_with gnutls) \
138 ${myconf} \
139 --docdir=/usr/share/doc/${PF} \
140 --htmldir=/usr/share/doc/${PF}/html \
141 --enable-filter \
142 --enable-adsp_lists \
143 --enable-dkim_reputation \
144 --enable-identity_header \
145 --enable-rate_limit \
146 --enable-redirect \
147 --enable-resign \
148 --enable-replace_rules \
149 --enable-default_sender \
150 --enable-sender_macro \
151 --enable-vbr \
152 --disable-rpath \
153 --disable-live-testing
154 }
155
156 src_install() {
157 emake DESTDIR="${D}" install
158
159 dosbin stats/opendkim-reportstats
160 newinitd "${FILESDIR}/opendkim.init.r2" opendkim
161 dodir /etc/opendkim /var/lib/opendkim
162 fowners milter:milter /var/lib/opendkim
163
164 # default configuration
165 if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then
166 grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \
167 > "${D}"/etc/opendkim/opendkim.conf
168 if use unbound; then
169 echo TrustedAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf
170 fi
171 echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf
172 if use berkdb; then
173 echo Statistics /var/lib/opendkim/stats.dat >> \
174 "${D}"/etc/opendkim/opendkim.conf
175 fi
176 fi
177
178 use static-libs || find "${D}" -name "*.la" -delete
179 }
180
181 pkg_postinst() {
182 elog "If you want to sign your mail messages and need some help"
183 elog "please run:"
184 elog " emerge --config ${CATEGORY}/${PN}"
185 elog "It will help you create your key and give you hints on how"
186 elog "to configure your DNS and MTA."
187
188 ewarn "Make sure your MTA has r/w access to the socket file."
189 ewarn "This can be done either by setting UMask to 002 and adding MTA's user"
190 ewarn "to milter group or you can simply set UMask to 000."
191 }
192
193 pkg_config() {
194 local selector keysize pubkey
195
196 read -p "Enter the selector name (default ${HOSTNAME}): " selector
197 [[ -n "${selector}" ]] || selector=${HOSTNAME}
198 if [[ -z "${selector}" ]]; then
199 eerror "Oddly enough, you don't have a HOSTNAME."
200 return 1
201 fi
202 if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then
203 ewarn "The private key for this selector already exists."
204 else
205 keysize=1024
206 # generate the private and public keys
207 opendkim-genkey -b ${keysize} -D "${ROOT}"etc/opendkim/ \
208 -s ${selector} -d '(your domain)' && \
209 chown milter:milter \
210 "${ROOT}"etc/opendkim/"${selector}".private || \
211 { eerror "Failed to create private and public keys." ; return 1; }
212 chmod go-r "${ROOT}"etc/opendkim/"${selector}".private
213 fi
214
215 # opendkim selector configuration
216 echo
217 einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:"
218 einfo " Keyfile /etc/opendkim/${selector}.private"
219 einfo " Selector ${selector}"
220
221 # MTA configuration
222 echo
223 einfo "If you are using Postfix, add following lines to your main.cf:"
224 einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
225 einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
226 einfo " and read http://www.postfix.org/MILTER_README.html"
227
228 # DNS configuration
229 einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
230 cat "${ROOT}"etc/opendkim/${selector}.txt
231 einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
232 einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
233 einfo
234 einfo "Also look at the ADSP http://tools.ietf.org/html/rfc5617"
235 }