summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2014-12-29 08:25:32 +0000
committerEray Aslan <eras@gentoo.org>2014-12-29 08:25:32 +0000
commit7268967d27729ec544cce1a956ab3626d73528f5 (patch)
tree63650a1f64a1fd197be5480d366a8906fc4266a9 /mail-filter
parentOld. (diff)
downloadhistorical-7268967d27729ec544cce1a956ab3626d73528f5.tar.gz
historical-7268967d27729ec544cce1a956ab3626d73528f5.tar.bz2
historical-7268967d27729ec544cce1a956ab3626d73528f5.zip
Version bump
Package-Manager: portage-2.2.15/cvs/Linux x86_64 Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/opendkim/ChangeLog9
-rw-r--r--mail-filter/opendkim/Manifest32
-rw-r--r--mail-filter/opendkim/opendkim-2.10.0.ebuild196
-rw-r--r--mail-filter/opendkim/opendkim-2.9.3.ebuild197
4 files changed, 419 insertions, 15 deletions
diff --git a/mail-filter/opendkim/ChangeLog b/mail-filter/opendkim/ChangeLog
index 24ced59a12ad..e747f63c4e4f 100644
--- a/mail-filter/opendkim/ChangeLog
+++ b/mail-filter/opendkim/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-filter/opendkim
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.84 2014/12/09 08:30:13 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.85 2014/12/29 08:25:20 eras Exp $
+
+*opendkim-2.10.0 (29 Dec 2014)
+*opendkim-2.9.3 (29 Dec 2014)
+
+ 29 Dec 2014; Eray Aslan <eras@gentoo.org> +opendkim-2.10.0.ebuild,
+ +opendkim-2.9.3.ebuild:
+ Version bump
09 Dec 2014; Eray Aslan <eras@gentoo.org>
-files/opendkim-2.8.0-unbreak_upgrade.patch, -opendkim-2.8.4.ebuild,
diff --git a/mail-filter/opendkim/Manifest b/mail-filter/opendkim/Manifest
index c6d6b05510ba..85ca918320e5 100644
--- a/mail-filter/opendkim/Manifest
+++ b/mail-filter/opendkim/Manifest
@@ -3,24 +3,28 @@ Hash: SHA256
AUX opendkim.init.r3 1545 SHA256 63f316ef776ad1a9fe87cff7748fac4574c2355b6205e3ef21285ddb84c8cb33 SHA512 c28b93f230b65ba483302dbb0f6cba0d8b2cf29cce0309521e67f6aa0e4c041b0dd69eaca8152d6b0b1b02dbe1ff9634fef0840856c8e192f17a1c24ffac7166 WHIRLPOOL f42cb79de47d2fdac26ef4a45132e996640da824aadaf0c3e66182160e941322ff78a37c18a32ca50efb0bb4fbf11b622a1ce5931146c47a06156c256d568b81
AUX opendkim.service 439 SHA256 8636aee39d924067d1f1673291d1501cec3e6fdee0de16533a1e3616471b35ed SHA512 308edc70fdb0bd57b424e739412217fd8017b017e9b27bc0954dec55294d10d8b7713f6f191836b94aa49bf578bfb391dca748af0c8d9b72e14ebe1eae21e834 WHIRLPOOL 4b7c42b130a31120efba7aa04f90cacd8c6b760204577e2914901eddc6cb425b1c06253d60f43673d28f9992e4b078010f444a390569544573601b3fdbf66e76
+DIST opendkim-2.10.0.tar.gz 1213007 SHA256 4a747c9028e1cba40b5f8ba64ec5fbcf9f7d27a8a41fec4b4a398e2a6001c747 SHA512 c1ef4a8e80ed8a6e64e9a9a4f6d2ec684622fb4248d1d1c9b696f14ec9f4163e7b37f1a936ec8d522b6531b91fc869ca875fd6ff58c96c75ba41c919bed40d53 WHIRLPOOL 8443c330265dd47774ed476e4a88da10e586dc27fe6f7d98bec8f88c9129e04df334bf2d4dcfa0c65ca9b5287d8fa478b9d9bd6da9672add32074d0d6d9da0bf
DIST opendkim-2.9.2.tar.gz 1229383 SHA256 1f0c66afbe48f6223d2ab985b2c27594ae45035e3e81eba887d8ec6e5e1282c0 SHA512 f6fe77897927a93c9f57d09e5e9f43b1e73e2b21a586461b5665fb430eee1362b33d9601c8643d50d5a53c8e01b03c7af331f28cd992c9163f959723f21ebf63 WHIRLPOOL b61212d272d07c367c7d9ecb951466b66759b6d449047c10947681ea6889a1f2b2c12986e6c11a59620fb8ace3c0a177235f65f58c54c993909f61dee5cf3c3a
+DIST opendkim-2.9.3.tar.gz 1230406 SHA256 79a84fc17fa6aa9428ed449b1b2b773b0a4cb4ac7fa69b01b178fe0b4691c533 SHA512 9ed79f4cc595ef6dded8c1c1af77404ed629d88d2dad11c72fc0ff961bb9ab62037e010b29b651bc2cdcbdbabf001199b12544330a3af851b61d05518cf92053 WHIRLPOOL 5f24ecb5084babcd572f9cce9645aba92f1a68643bd4928b5040f3cad21f299380af746ad2dcefacc5803438a06c021a85da2be80ecf91308e7519d2df93cf51
+EBUILD opendkim-2.10.0.ebuild 6208 SHA256 9ddbc15d9b2416077bf82205699a5417a64bf0b52c84a7ef0598085561007457 SHA512 56d964432ca020f352d834053815ebffa107b7a734511164f5cb3c28f290abd0b9e2db65353a3f93f401f7c995ec861d6559c4a9e763d45966772aee036000b6 WHIRLPOOL e4010d1b72028481dd84772dcf88c7b7c19b2808bbfad29e2e3274da671c979ab62716b238b538c73ae798dc68be3431179867014fcb07c4f17a25d94ea51d60
EBUILD opendkim-2.9.2-r1.ebuild 6237 SHA256 e6ea67d53781c8b4f35cfd983fb779395420097bf558a4dabbcaf21db540b55d SHA512 38465631a7e619973209b6aec1afffc0dbbd07eb8218a5ba811b1596da64a92d96c3cd43bfb6fcd89f3b8d29d39f387f7124788e91ad0162b218380cb3002a20 WHIRLPOOL 0088c2c4bd969b202cc809fb42c1880be37e1236fbdcb0d588a2ee100dc75d7866df754cefaa5874ddf8d851b48db88dbf2cba6623d428db07d026ce4cc5825f
-MISC ChangeLog 14466 SHA256 d552de9c02457a19ea4175018be9382780e3792047ef834c785f1d86f58d0439 SHA512 1496fd00b695b28176b802b81ddb94db250011b0a95a0d507938b15117adbbbb4db3584ac085f38ddb0f652c8c0d229411c39a69a03627eeafff00d1f24be5e0 WHIRLPOOL c16088d6acb86a4e895d0abf6ad25c701d96204196c1516662507c6c5295e9169cba2204f770167b26c020f8ce6480919a0d8af10c65534487087a7dafd8f068
+EBUILD opendkim-2.9.3.ebuild 6231 SHA256 24fd9d2d6d2543644ff9da5a86e0ec875d6a92125f76649a56ee6fba377d3391 SHA512 bc47ddd421a69953757b10bd7e965b6194465be2bcca401e9942fca45d645b0f47749751313433c8292e8385b475c7f67cda0e819bf1ce61c3220dfdb1709a25 WHIRLPOOL 3f22a2ea86bf3543d802cc7e2c26393d58ab8797814247ce3b26ee1093802a3fdd6b48d8e1c3c98094428aa1d59c9a9a30c8f1dd3b6c779f4111dc05715c4f2b
+MISC ChangeLog 14639 SHA256 de74fbeed29fa489de78f958945d0bb6a340c54493c07a6463b04883b83adf3d SHA512 237bd1f98aa040bb01cf1f415f70bff3ab71c95bb2cbbc15da1b0f007f0ac9de17c034378bad25f7820dc903e4dfbc18ea8d6e333cd21c24bbb893b2d82fb63e WHIRLPOOL cdb51fec6465d401597b839e9bc99cd8bfb93b2380f175fdf1e878ee203de1d66803ff3773b24f346867c09de50488a9370719b9d134d200f4e2bee79d0fc483
MISC metadata.xml 1403 SHA256 85ffb9c9df1fd60d7f22db45e8d4b1edb2b882dd0fb2004a646651e4f7e675a8 SHA512 b7529c54897e04109deeeb30414ab175de5989baeeb398042995fa193ec0302bbc74a43037550c4a2dc60e490443eeaa4bcb038229b1ea179f70e32e27bdf37a WHIRLPOOL 862f684ef7c3d6f40d5b95eca699e003f0085c62cef406c54a307d4be3d8a847582c2bc3c68eb0208e072b506162a27bde6115fcfad548b1865bee7f033ae371
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJUhrMeAAoJEHfx8XVYajsfJt8P/02PLWNw9aBVXz1yau8yRdL/
-25ihOSNoah6kBBvrjSlaA/SIC8h8hMWjPxOlXVox8bDmDMCEPwLRdHhQILCMrJA7
-iB4Wy4grxrd90g00bHfbGPam5ZX3x1trtKQB4iBsXLCMbTQing9FAkF4n4M63kkK
-naQI4v/c3mvYFUl2gF9Ln5TkU8RbNEdtUf1/svPBJcocqfBFTgTTS3GqWI9l+l8n
-/heTkczysM61FpDj7yKuW+CvWmU1qRL/wntFTu8HeSM8AE2kUM7ewOo8Aj/hfNXH
-Gz0C7RBS/Z26+hHMuJ/BIMGu6bFbtDnSkvRvfn8fKrx8HeT6NS1kUhR7kmNQdYsN
-B32Xdgvrf7Ulo/gcfwDALvq1wutKSq6YaX3ak1eSxXx/6L0dkWufr/Ib6lsZrC9Z
-2FjpH2fueWPskT7zs7dRPbAGTO8H8uegpgaDn/geQJUVZH7oxLAsWHGp00bbMHb7
-Op4E7k4q6KZF422VxMvCpqPArb8aX3NsrGxMBqqhjpcbhRkWWJRJypviraXbQ3oe
-3k83hWvDN2CIxAjAXE6VLFgoyQe/THesCnN/Z9jAMoW8ypC+BtXuI7gc2UCTol5q
-JeJi11xb0OqlOdpU0S3ul8hKe9KIenzfcj4LLrQIuz7ojLwzS9/G2hKsByAC5LKl
-M/gFtFN9kXvjnTPkLhnX
-=3EtI
+iQIcBAEBCAAGBQJUoQ/8AAoJEHfx8XVYajsfPSgP/RqNZWufnl1aWeN6HNmBQG6r
+nZ1loHpnu/M9+gEKH9GXW1NOb8N9qb7yCkAVswTmE3O1L0MNQ6c/AMuBvnxTgxC1
+XLjPK8F7ifYe2uvG26e82QCNC+eQtSRI8M+fhKJ6LOn930QBoYCcmp1wHSBma6uy
+G5/LQIF7luUCfQTrEq85VF07Vm0g3VtEgfXnGferY6Yw8v2C/PMzSz/PqKpIspIh
+RWM5ewHKEtgomRrD+AcYKycTYeQ92Qni2fNJ6d9ZcQ2Fae+QocgnWkwj75C2Hqne
+L0OD4YoCeA+y8vYcsPPw/lieiHynMdsu9ZBOcCVDAJcPZEPvqZciqBubSk5toxmj
+7/SyyJX0ZGhNkF3MsKya7z6jMhClx4Bqj37bGBkQnzSmBk+nmrMO8+UjITa/PhkY
+3RspnMd5qtjokvcvzKEgecRMyW2DCqBdrtDXOlondLMyqKRg8wp0VDEySjXVap+2
+2m+SwseX/e2kc+cp5sGpl9NK7XxmstaRjjZVcL1wl5TKEAZXTFu5yEx8acJC5Zth
+/HT9XgcgXtb1fPuE4//miUezs9zcshoWEkklL3Ig6WpKbtf5x1rJt5/VY/AISePq
+oEC7BpcSatkAdhO+ZyxUfrgzuGBYqOM1s6M0uqx4P3ZabNVF99DJX+6s8IpuXwtH
+v25FAv9yWt49dKtfIoeD
+=Y5PS
-----END PGP SIGNATURE-----
diff --git a/mail-filter/opendkim/opendkim-2.10.0.ebuild b/mail-filter/opendkim/opendkim-2.10.0.ebuild
new file mode 100644
index 000000000000..97971159ab85
--- /dev/null
+++ b/mail-filter/opendkim/opendkim-2.10.0.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-2.10.0.ebuild,v 1.1 2014/12/29 08:25:20 eras Exp $
+
+EAPI=5
+inherit autotools db-use eutils systemd user
+
+# for betas
+#MY_P=${P/_b/.B}
+#S=${WORKDIR}/${PN}-2.8.0
+#SRC_URI="mirror://sourceforge/opendkim/${MY_P}.tar.gz"
+
+DESCRIPTION="A milter-based application to provide DKIM signing and verification"
+HOMEPAGE="http://opendkim.org"
+SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
+
+LICENSE="Sendmail-Open-Source BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+berkdb gnutls ldap lmdb lua memcached opendbx poll sasl selinux +ssl static-libs unbound"
+
+DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
+ dev-libs/libbsd
+ ssl? ( >=dev-libs/openssl-0.9.8 )
+ berkdb? ( >=sys-libs/db-3.2 )
+ opendbx? ( >=dev-db/opendbx-1.4.0 )
+ lua? ( dev-lang/lua )
+ ldap? ( net-nds/openldap )
+ lmdb? ( dev-db/lmdb )
+ memcached? ( dev-libs/libmemcached )
+ sasl? ( dev-libs/cyrus-sasl )
+ unbound? ( >=net-dns/unbound-1.4.1 net-dns/dnssec-root )
+ !unbound? ( net-libs/ldns )
+ gnutls? ( >=net-libs/gnutls-2.11.7 )"
+
+RDEPEND="${DEPEND}
+ sys-process/psmisc
+ selinux? ( sec-policy/selinux-dkim )
+"
+
+REQUIRED_USE="sasl? ( ldap )"
+
+pkg_setup() {
+ enewgroup milter
+ # mail-milter/spamass-milter creates milter user with this home directory
+ # For consistency reasons, milter user must be created here with this home directory
+ # even though this package doesn't need a home directory for this user (#280571)
+ enewuser milter -1 -1 /var/lib/milter milter
+}
+
+src_prepare() {
+ sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \
+ -e 's:/var/db/opendkim:/var/lib/opendkim:g' \
+ -e 's:/etc/mail:/etc/opendkim:g' \
+ -e 's:mailnull:milter:g' \
+ -e 's:^#[[:space:]]*PidFile.*:PidFile /run/opendkim/opendkim.pid:' \
+ opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \
+ stats/opendkim-reportstats{,.in} || die
+
+ sed -i -e 's:dist_doc_DATA:dist_html_DATA:' libopendkim/docs/Makefile.am \
+ || die
+
+ #sed -i -e '/sock.*mt.getcwd/s:mt.getcwd():"/tmp":' opendkim/tests/*.lua
+ #sed -i -e '/sock.*mt.getcwd/s:mt.getcwd():"/proc/self/cwd":' opendkim/tests/*.lua
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use berkdb ; then
+ myconf=$(db_includedir)
+ myconf="--with-db-incdir=${myconf#-I}"
+ myconf+=" --enable-popauth"
+ myconf+=" --enable-query_cache"
+ myconf+=" --enable-stats"
+ fi
+ if use unbound; then
+ myconf+=" --with-unbound"
+ else
+ myconf+=" --with-ldns"
+ fi
+ if use ldap; then
+ myconf+=" $(use_with sasl)"
+ fi
+ econf \
+ $(use_with berkdb db) \
+ $(use_with opendbx odbx) \
+ $(use_with lua) \
+ $(use_enable lua rbl) \
+ $(use_with ldap openldap) \
+ $(use_with lmdb) \
+ $(use_enable poll) \
+ $(use_enable static-libs static) \
+ $(use_with gnutls) \
+ $(use_with memcached libmemcached) \
+ ${myconf} \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --enable-filter \
+ --enable-atps \
+ --enable-identity_header \
+ --enable-rate_limit \
+ --enable-resign \
+ --enable-replace_rules \
+ --enable-default_sender \
+ --enable-sender_macro \
+ --enable-vbr \
+ --disable-live-testing \
+ --with-test-socket=/tmp/opendkim-$(echo ${RANDOM})-S
+ #--disable-rpath
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dosbin stats/opendkim-reportstats
+
+ newinitd "${FILESDIR}/opendkim.init.r3" opendkim
+ systemd_dounit "${FILESDIR}/opendkim.service"
+
+ dodir /etc/opendkim /var/lib/opendkim
+ fowners milter:milter /var/lib/opendkim
+
+ # default configuration
+ if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then
+ grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \
+ > "${D}"/etc/opendkim/opendkim.conf
+ if use unbound; then
+ echo TrustAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf
+ fi
+ echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf
+ if use berkdb; then
+ echo Statistics /var/lib/opendkim/stats.dat >> \
+ "${D}"/etc/opendkim/opendkim.conf
+ fi
+ fi
+
+ use static-libs || find "${D}" -name "*.la" -delete
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSION} ]]; then
+ elog "If you want to sign your mail messages and need some help"
+ elog "please run:"
+ elog " emerge --config ${CATEGORY}/${PN}"
+ elog "It will help you create your key and give you hints on how"
+ elog "to configure your DNS and MTA."
+
+ ewarn "Make sure your MTA has r/w access to the socket file."
+ ewarn "This can be done either by setting UMask to 002 and adding MTA's user"
+ ewarn "to milter group or you can simply set UMask to 000."
+ fi
+}
+
+pkg_config() {
+ local selector keysize pubkey
+
+ read -p "Enter the selector name (default ${HOSTNAME}): " selector
+ [[ -n "${selector}" ]] || selector=${HOSTNAME}
+ if [[ -z "${selector}" ]]; then
+ eerror "Oddly enough, you don't have a HOSTNAME."
+ return 1
+ fi
+ if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then
+ ewarn "The private key for this selector already exists."
+ else
+ keysize=1024
+ # generate the private and public keys
+ opendkim-genkey -b ${keysize} -D "${ROOT}"etc/opendkim/ \
+ -s ${selector} -d '(your domain)' && \
+ chown milter:milter \
+ "${ROOT}"etc/opendkim/"${selector}".private || \
+ { eerror "Failed to create private and public keys." ; return 1; }
+ chmod go-r "${ROOT}"etc/opendkim/"${selector}".private
+ fi
+
+ # opendkim selector configuration
+ echo
+ einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:"
+ einfo " Keyfile /etc/opendkim/${selector}.private"
+ einfo " Selector ${selector}"
+
+ # MTA configuration
+ echo
+ einfo "If you are using Postfix, add following lines to your main.cf:"
+ einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
+ einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
+ einfo " and read http://www.postfix.org/MILTER_README.html"
+
+ # DNS configuration
+ einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
+ cat "${ROOT}"etc/opendkim/${selector}.txt
+ einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
+ einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
+}
diff --git a/mail-filter/opendkim/opendkim-2.9.3.ebuild b/mail-filter/opendkim/opendkim-2.9.3.ebuild
new file mode 100644
index 000000000000..a6506e7f7467
--- /dev/null
+++ b/mail-filter/opendkim/opendkim-2.9.3.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-2.9.3.ebuild,v 1.1 2014/12/29 08:25:20 eras Exp $
+
+EAPI=5
+inherit autotools db-use eutils systemd user
+
+# for betas
+#MY_P=${P/_b/.B}
+#S=${WORKDIR}/${PN}-2.8.0
+#SRC_URI="mirror://sourceforge/opendkim/${MY_P}.tar.gz"
+
+DESCRIPTION="A milter-based application to provide DKIM signing and verification"
+HOMEPAGE="http://opendkim.org"
+SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
+
+LICENSE="Sendmail-Open-Source BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+berkdb gnutls ldap lmdb lua memcached opendbx poll sasl selinux +ssl static-libs unbound"
+
+DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
+ dev-libs/libbsd
+ ssl? ( >=dev-libs/openssl-0.9.8 )
+ berkdb? ( >=sys-libs/db-3.2 )
+ opendbx? ( >=dev-db/opendbx-1.4.0 )
+ lua? ( dev-lang/lua )
+ ldap? ( net-nds/openldap )
+ lmdb? ( dev-db/lmdb )
+ memcached? ( dev-libs/libmemcached )
+ sasl? ( dev-libs/cyrus-sasl )
+ unbound? ( >=net-dns/unbound-1.4.1 net-dns/dnssec-root )
+ !unbound? ( net-libs/ldns )
+ gnutls? ( >=net-libs/gnutls-2.11.7 )"
+
+RDEPEND="${DEPEND}
+ sys-process/psmisc
+ selinux? ( sec-policy/selinux-dkim )
+"
+
+REQUIRED_USE="sasl? ( ldap )"
+
+pkg_setup() {
+ enewgroup milter
+ # mail-milter/spamass-milter creates milter user with this home directory
+ # For consistency reasons, milter user must be created here with this home directory
+ # even though this package doesn't need a home directory for this user (#280571)
+ enewuser milter -1 -1 /var/lib/milter milter
+}
+
+src_prepare() {
+ sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \
+ -e 's:/var/db/opendkim:/var/lib/opendkim:g' \
+ -e 's:/etc/mail:/etc/opendkim:g' \
+ -e 's:mailnull:milter:g' \
+ -e 's:^#[[:space:]]*PidFile.*:PidFile /run/opendkim/opendkim.pid:' \
+ opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \
+ stats/opendkim-reportstats{,.in} || die
+
+ sed -i -e 's:dist_doc_DATA:dist_html_DATA:' libopendkim/docs/Makefile.am \
+ || die
+
+ #sed -i -e '/sock.*mt.getcwd/s:mt.getcwd():"/tmp":' opendkim/tests/*.lua
+ sed -i -e '/sock.*mt.getcwd/s:mt.getcwd():"/proc/self/cwd":' opendkim/tests/*.lua
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use berkdb ; then
+ myconf=$(db_includedir)
+ myconf="--with-db-incdir=${myconf#-I}"
+ myconf+=" --enable-popauth"
+ myconf+=" --enable-query_cache"
+ myconf+=" --enable-stats"
+ fi
+ if use unbound; then
+ myconf+=" --with-unbound"
+ else
+ myconf+=" --with-ldns"
+ fi
+ if use ldap; then
+ myconf+=" $(use_with sasl)"
+ fi
+ econf \
+ $(use_with berkdb db) \
+ $(use_with opendbx odbx) \
+ $(use_with lua) \
+ $(use_enable lua rbl) \
+ $(use_with ldap openldap) \
+ $(use_with lmdb) \
+ $(use_enable poll) \
+ $(use_enable static-libs static) \
+ $(use_with gnutls) \
+ $(use_with memcached libmemcached) \
+ ${myconf} \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --enable-filter \
+ --enable-adsp_lists \
+ --enable-atps \
+ --enable-identity_header \
+ --enable-rate_limit \
+ --enable-resign \
+ --enable-replace_rules \
+ --enable-default_sender \
+ --enable-sender_macro \
+ --enable-vbr \
+ --disable-live-testing
+ #--disable-rpath \
+ #--with-test-socket=/tmp/opendkim-$(echo ${RANDOM})-S
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dosbin stats/opendkim-reportstats
+
+ newinitd "${FILESDIR}/opendkim.init.r3" opendkim
+ systemd_dounit "${FILESDIR}/opendkim.service"
+
+ dodir /etc/opendkim /var/lib/opendkim
+ fowners milter:milter /var/lib/opendkim
+
+ # default configuration
+ if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then
+ grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \
+ > "${D}"/etc/opendkim/opendkim.conf
+ if use unbound; then
+ echo TrustAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf
+ fi
+ echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf
+ if use berkdb; then
+ echo Statistics /var/lib/opendkim/stats.dat >> \
+ "${D}"/etc/opendkim/opendkim.conf
+ fi
+ fi
+
+ use static-libs || find "${D}" -name "*.la" -delete
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSION} ]]; then
+ elog "If you want to sign your mail messages and need some help"
+ elog "please run:"
+ elog " emerge --config ${CATEGORY}/${PN}"
+ elog "It will help you create your key and give you hints on how"
+ elog "to configure your DNS and MTA."
+
+ ewarn "Make sure your MTA has r/w access to the socket file."
+ ewarn "This can be done either by setting UMask to 002 and adding MTA's user"
+ ewarn "to milter group or you can simply set UMask to 000."
+ fi
+}
+
+pkg_config() {
+ local selector keysize pubkey
+
+ read -p "Enter the selector name (default ${HOSTNAME}): " selector
+ [[ -n "${selector}" ]] || selector=${HOSTNAME}
+ if [[ -z "${selector}" ]]; then
+ eerror "Oddly enough, you don't have a HOSTNAME."
+ return 1
+ fi
+ if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then
+ ewarn "The private key for this selector already exists."
+ else
+ keysize=1024
+ # generate the private and public keys
+ opendkim-genkey -b ${keysize} -D "${ROOT}"etc/opendkim/ \
+ -s ${selector} -d '(your domain)' && \
+ chown milter:milter \
+ "${ROOT}"etc/opendkim/"${selector}".private || \
+ { eerror "Failed to create private and public keys." ; return 1; }
+ chmod go-r "${ROOT}"etc/opendkim/"${selector}".private
+ fi
+
+ # opendkim selector configuration
+ echo
+ einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:"
+ einfo " Keyfile /etc/opendkim/${selector}.private"
+ einfo " Selector ${selector}"
+
+ # MTA configuration
+ echo
+ einfo "If you are using Postfix, add following lines to your main.cf:"
+ einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
+ einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
+ einfo " and read http://www.postfix.org/MILTER_README.html"
+
+ # DNS configuration
+ einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
+ cat "${ROOT}"etc/opendkim/${selector}.txt
+ einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
+ einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
+}