Gentoo Archives: gentoo-commits

From: "Daniel Black (dragonheart)" <dragonheart@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-filter/opendkim: opendkim-1.1.0.ebuild ChangeLog metadata.xml
Date: Tue, 06 Oct 2009 09:10:45
Message-Id: E1Mv64B-0004xQ-PP@stork.gentoo.org
1 dragonheart 09/10/06 09:10:43
2
3 Added: opendkim-1.1.0.ebuild ChangeLog metadata.xml
4 Log:
5 initial ebuild by me. Eray Aslan also requested this in bug #282488
6 (Portage version: 2.2_rc42/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 mail-filter/opendkim/opendkim-1.1.0.ebuild
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/opendkim-1.1.0.ebuild?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/opendkim-1.1.0.ebuild?rev=1.1&content-type=text/plain
13
14 Index: opendkim-1.1.0.ebuild
15 ===================================================================
16 # Copyright 1999-2009 Gentoo Foundation
17 # Distributed under the terms of the GNU General Public License v2
18 # $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-1.1.0.ebuild,v 1.1 2009/10/06 09:10:43 dragonheart Exp $
19
20 EAPI="2"
21
22 inherit eutils autotools toolchain-funcs
23
24 DESCRIPTION="A milter-based application to provide DKIM signing and verification"
25 HOMEPAGE="http://opendkim.org"
26 SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
27
28 LICENSE="Sendmail-Open-Source"
29 SLOT="0"
30 KEYWORDS="~amd64 ~x86"
31 IUSE="+db"
32
33 # FUTURE: unbound (dnssec lib) - bug #223103
34
35 DEPEND="dev-libs/openssl
36 db? ( >=sys-libs/db-3.2 )
37 || ( mail-filter/libmilter mail-mta/sendmail )"
38 RDEPEND="dev-libs/openssl"
39
40 pkg_setup() {
41 enewgroup milter
42 # mail-milter/spamass-milter creates milter user with this home directory
43 # For consistency reasons, milter user must be created here with this home directory
44 # even though this package doesn't need a home directory for this user (#280571)
45 enewuser milter -1 -1 /var/lib/milter milter
46 }
47
48 src_prepare() {
49 epatch "${FILESDIR}/${P}"-flockinclude.patch
50 epatch "${FILESDIR}/${P}"-autoconf-automake.patch
51 epatch "${FILESDIR}/${P}"-rep-querycache.patch
52 epatch "${FILESDIR}/${P}"-vbr-booliscpp.patch
53 eautoreconf
54 sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \
55 -e 's:/etc/mail:/etc/opendkim:g' \
56 opendkim/opendkim.conf.sample
57 }
58
59 src_configure() {
60 econf $(use_enable db bodylengthdb) \
61 $(use_enable db popauth) \
62 $(use_enable db querycache) \
63 $(use_enable db stats) \
64 --without-domainkeys \
65 --enable-arlib \
66 --enable-dkimreputation \
67 --enable-dnsupgrade \
68 --enable-multiplesigs \
69 --enable-reportintervals \
70 --enable-vbr
71 }
72
73 src_install() {
74 emake DESTDIR="${D}" install
75 # file collision
76 rm "${D}"/usr/share/man/man3/ar.3
77
78 mv "${D}"/usr/share/doc/opendkim "${D}"/usr/share/doc/${PF}
79 newinitd "${FILESDIR}/opendkim.init" opendkim
80 dodir /etc/opendkim /var/run/opendkim /var/lib/opendkim
81 fowners milter:milter /var/run/opendkim /etc/opendkim /var/lib/opendkim
82
83 # default configuration
84 if [ ! -f /etc/opendkim/opendkim.conf ]; then
85 grep ^[^#] "${S}"/opendkim/opendkim.conf.sample \
86 > "${D}"/etc/opendkim/opendkim.conf
87 echo \# Socket local:/var/run/opendkim/opendkim.sock >> \
88 "${D}"/etc/opendkim/opendkim.conf
89 echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf
90 if use db; then
91 echo Statistics /var/lib/opendkim/stats.db >> \
92 "${D}"/etc/opendkim/opendkim.conf
93 fi
94 fi
95 }
96
97 pkg_postinst() {
98 elog "If you want to sign your mail messages, you will have to run"
99 elog " emerge --config ${CATEGORY}/${PN}"
100 elog "It will help you create your key and give you hints on how"
101 elog "to configure your DNS and MTA."
102
103 ewarn "Make sure your MTA has r/w access to the socket file."
104 ewarn "This can be done either by setting UMask to 002 and adding MTA's user"
105 ewarn "to milter group or you can simply set UMask to 000."
106 }
107
108 pkg_config() {
109 local selector keysize pubkey
110
111 read -p "Enter the selector name (default ${HOSTNAME}): " selector
112 [[ -n "${selector}" ]] || selector=${HOSTNAME}
113 if [[ -z "${selector}" ]]; then
114 eerror "Oddly enough, you don't have a HOSTNAME."
115 return 1
116 fi
117 if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then
118 ewarn "The private key for this selector already exists."
119 else
120 einfo "Select the size of private key:"
121 einfo " [1] 512 bits"
122 einfo " [2] 1024 bits"
123 while read -n 1 -s -p " Press 1 or 2 on the keyboard to select the key size " keysize ; do
124 [[ "${keysize}" == "1" || "${keysize}" == "2" ]] && echo && break
125 done
126 case ${keysize} in
127 1) keysize=512 ;;
128 *) keysize=1024 ;;
129 esac
130
131 # generate the private and public keys
132 opendkim-genkey.sh -b ${keysize} -D "${ROOT}"etc/opendkim/ \
133 -s ${selector} && \
134 chown milter:milter \
135 "${ROOT}"etc/opendkim/"${selector}".private || \
136 { eerror "Failed to create private and public keys." ; return 1; }
137 chmod go-r "${ROOT}"etc/opendkim/"${selector}".private
138 fi
139
140 # opendkim selector configuration
141 echo
142 einfo "Make sure you have the following settings in your dkim-filter.conf:"
143 einfo " Keyfile /etc/opendkim/${selector}.private"
144 einfo " Selector ${selector}"
145
146 # MTA configuration
147 echo
148 einfo "If you are using Postfix, add following lines to your main.cf:"
149 einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
150 einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
151
152 # DNS configuration
153 einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
154 cat "${ROOT}"etc/opendkim/${selector}.txt
155 einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
156 einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
157 einfo
158 einfo "Also look at the ADSP http://tools.ietf.org/html/rfc5617"
159 }
160
161
162
163 1.1 mail-filter/opendkim/ChangeLog
164
165 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.1&view=markup
166 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.1&content-type=text/plain
167
168 Index: ChangeLog
169 ===================================================================
170 # ChangeLog for mail-filter/opendkim
171 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
172 # $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.1 2009/10/06 09:10:43 dragonheart Exp $
173
174 *opendkim-1.1.0 (06 Oct 2009)
175
176 06 Oct 2009; Daniel Black <dragonheart@g.o> +opendkim-1.1.0.ebuild,
177 +files/opendkim-1.1.0-autoconf-automake.patch,
178 +files/opendkim-1.1.0-flockinclude.patch,
179 +files/opendkim-1.1.0-rep-querycache.patch,
180 +files/opendkim-1.1.0-vbr-booliscpp.patch, +files/opendkim.init,
181 +metadata.xml:
182 initial ebuild by me. Eray Aslan also requested this in bug #282488
183
184
185
186
187 1.1 mail-filter/opendkim/metadata.xml
188
189 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/metadata.xml?rev=1.1&view=markup
190 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/metadata.xml?rev=1.1&content-type=text/plain
191
192 Index: metadata.xml
193 ===================================================================
194 <?xml version="1.0" encoding="UTF-8"?>
195 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
196 <pkgmetadata>
197 <herd>no-herd</herd>
198 <maintainer>
199 <email>dragonheart@g.o</email>
200 <name>Daniel Black</name>
201 </maintainer>
202 <longdescription>A program implementing the Milter API that signs and verifies
203 using the DKIM standard. This is a fork of Sendmail's DKIM-milter</longdescription>
204 <use>
205 <flag name='db'>Include features like stats, querycache, popauth and
206 bodylengthdb that include berkdb</flag>
207 </use>
208 </pkgmetadata>