1 # Copyright 1999-2019 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
45 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
46 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
48 $(use_with spf spf2-include "${EPREFIX}"/usr/include/spf2) \
49 $(use_with spf spf2-lib "${EPREFIX}"/usr/$(get_libdir)) \
50 $(use_enable static-libs static)
56 use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.la
58 newinitd "${FILESDIR}"/opendmarc.initd opendmarc
59 newconfd "${FILESDIR}"/opendmarc.confd opendmarc
60 systemd_dounit "${FILESDIR}/${PN}.service"
66 -e 's:^# UserID .*$:UserID milter:' \
67 -e "s:^# PidFile .*:PidFile ${EPREFIX}/var/run/opendmarc/opendmarc.pid:" \
68 -e '/^# Socket /s:^# ::' \
69 "${S}"/opendmarc/opendmarc.conf.sample \
70 > "${ED}"/etc/opendmarc/opendmarc.conf \