1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit user multilib systemd
8 DESCRIPTION="Open source DMARC implementation "
9 HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
10 SRC_URI="mirror://sourceforge/opendmarc/${P}.tar.gz"
14 KEYWORDS="~alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
15 IUSE="spf +reports static-libs"
17 DEPEND="reports? ( dev-perl/DBI )
18 || ( mail-filter/libmilter mail-mta/sendmail )"
25 spf? ( mail-filter/libspf2 )"
28 "${FILESDIR}"/${P}-multiple-From.patch
33 enewuser milter -1 -1 /var/lib/milter milter
38 if use !reports ; then
39 sed -i -e '/^SUBDIRS =/s/reports//' Makefile.in || die
46 $(use_with spf spf2-include "${EPREFIX}"/usr/include/spf2) \
47 $(use_with spf spf2-lib "${EPREFIX}"/usr/$(get_libdir)) \
48 $(use_enable static-libs static)
54 use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.la
56 newinitd "${FILESDIR}"/opendmarc.initd opendmarc
57 newconfd "${FILESDIR}"/opendmarc.confd opendmarc
58 systemd_dounit "${FILESDIR}/${PN}.service"
64 -e 's:^# UserID .*$:UserID milter:' \
65 -e "s:^# PidFile .*:PidFile ${EPREFIX}/var/run/opendmarc/opendmarc.pid:" \
66 -e '/^# Socket /s:^# ::' \
67 "${S}"/opendmarc/opendmarc.conf.sample \
68 > "${ED}"/etc/opendmarc/opendmarc.conf \