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