summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail-filter/opendmarc/Manifest1
-rw-r--r--mail-filter/opendmarc/files/opendmarc-1.4.1-build-fix.patch17
-rw-r--r--mail-filter/opendmarc/opendmarc-1.4.1.ebuild70
3 files changed, 88 insertions, 0 deletions
diff --git a/mail-filter/opendmarc/Manifest b/mail-filter/opendmarc/Manifest
index d24d52d896e5..d5a567f1a869 100644
--- a/mail-filter/opendmarc/Manifest
+++ b/mail-filter/opendmarc/Manifest
@@ -1 +1,2 @@
DIST opendmarc-1.3.3.tar.gz 575319 BLAKE2B 72dae5553fea9a51d860aaac6d85171a245584a74134df2249217a88f3da04c4eb518141f6342e281c6a9186345d69a34b585dc3ed18bdb53313374db505f4f5 SHA512 bb4bf8e3ad2d1732b07e55316819d4fd708e529b54a336d7d00763e13bfc62580bb1b30f132fa786dbca15e526e8dd5e146c7be454e1c42714a9f57126fc5e12
+DIST opendmarc-1.4.1.tar.gz 426186 BLAKE2B 894b1cdce322950729de542d9c36d1a3226d6eff519ddce5715b50fd561edb815bef33b01194f216ac5388626dab6157391d837da3f11f7e67e3c52a1350f06c SHA512 df0276ebb9a72bfd5bf339976661f48ac66e273f17f66ee633c0017c588936fa0f4236ed15167c834bd394d8ff17dffcc07a92734093e63f84847dab35e69404
diff --git a/mail-filter/opendmarc/files/opendmarc-1.4.1-build-fix.patch b/mail-filter/opendmarc/files/opendmarc-1.4.1-build-fix.patch
new file mode 100644
index 000000000000..9be5752828c2
--- /dev/null
+++ b/mail-filter/opendmarc/files/opendmarc-1.4.1-build-fix.patch
@@ -0,0 +1,17 @@
+https://github.com/trusteddomainproject/OpenDMARC/issues/163
+
+mdomsch
+
+commit ab1bc01 removed conf_holdquarentinedmessages, but not completely.
+A reference to it still exists which causes the build to fail.
+
+--- a/opendmarc/opendmarc.c
++++ b/opendmarc/opendmarc.c
+@@ -3591,7 +3591,6 @@
+ ret = SMFIS_CONTINUE;
+
+ if (conf->conf_rejectfail &&
+- conf->conf_holdquarantinedmessages &&
+ random() % 100 < pct)
+ {
+ snprintf(replybuf, sizeof replybuf,
diff --git a/mail-filter/opendmarc/opendmarc-1.4.1.ebuild b/mail-filter/opendmarc/opendmarc-1.4.1.ebuild
new file mode 100644
index 000000000000..6bbee3d7628b
--- /dev/null
+++ b/mail-filter/opendmarc/opendmarc-1.4.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib systemd
+
+DESCRIPTION="Open source DMARC implementation"
+HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
+SRC_URI="https://github.com/trusteddomainproject/OpenDMARC/archive/rel-${PN}-${PV//./-}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="spf +reports static-libs"
+
+DEPEND="reports? ( dev-perl/DBI )
+ || ( mail-filter/libmilter mail-mta/sendmail )"
+RDEPEND="${DEPEND}
+ acct-user/opendmarc
+ reports? (
+ dev-perl/DBD-mysql
+ dev-perl/HTTP-Message
+ dev-perl/Switch
+ )
+ spf? ( mail-filter/libspf2 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.1-build-fix.patch
+)
+
+S=${WORKDIR}/OpenDMARC-rel-${PN}-${PV//./-}
+
+src_prepare() {
+ default
+
+ eautoreconf
+ if use !reports ; then
+ sed -i -e '/^SUBDIRS =/s/reports//' Makefile.in || die
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_with spf) \
+ $(use_with spf spf2-include "${EPREFIX}"/usr/include/spf2) \
+ $(use_with spf spf2-lib "${EPREFIX}"/usr/$(get_libdir)) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.la
+
+ newinitd "${FILESDIR}"/opendmarc.initd opendmarc
+ newconfd "${FILESDIR}"/opendmarc.confd opendmarc
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ dodir /etc/opendmarc
+
+ # create config file
+ sed \
+ -e 's:^# UserID .*$:UserID opendmarc:' \
+ -e "s:^# PidFile .*:PidFile ${EPREFIX}/var/run/opendmarc/opendmarc.pid:" \
+ -e '/^# Socket /s:^# ::' \
+ "${S}"/opendmarc/opendmarc.conf.sample \
+ > "${ED}"/etc/opendmarc/opendmarc.conf \
+ || die
+}