mail-filter/opendmarc: cleanup and fix bugs #655728, #662112
authorFabian Groffen <grobian@gentoo.org>
Mon, 10 Dec 2018 10:34:55 +0000 (11:34 +0100)
committerFabian Groffen <grobian@gentoo.org>
Mon, 10 Dec 2018 10:34:55 +0000 (11:34 +0100)
Bug: https://bugs.gentoo.org/640012
Closes: https://bugs.gentoo.org/655728
Closes: https://bugs.gentoo.org/662112
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

mail-filter/opendmarc/Manifest
mail-filter/opendmarc/files/opendmarc.service
mail-filter/opendmarc/opendmarc-1.3.0.ebuild [deleted file]
mail-filter/opendmarc/opendmarc-1.3.2-r2.ebuild [moved from mail-filter/opendmarc/opendmarc-1.3.1.ebuild with 54% similarity]

index aafb9dd996dddf92f9d1be66080a44e821e78722..7769c4748e3c783d117033258e8397ce168a3dc7 100644 (file)
@@ -1,4 +1,2 @@
 DIST opendmarc-1.1.3.tar.gz 586574 BLAKE2B a5574aa705db6e5b87a704f3073039d667c9052d1ec907ca9423532f62d52cbdaf7af1680a2179198616f27786940650492ad39c4fdb668c27c5979804471eea SHA512 30de56b6da1665e0ed68484702bfcfcbd0b65275053818c807c16dea26f0e014a0484dc9d5ed6d1405628ea22a61082f13cecf66714a414139f612c51a294086
-DIST opendmarc-1.3.0.tar.gz 640017 BLAKE2B 6ffe63ac8a610ae4ef9904379e42e11f2dbc09e14a7febe36e875247f72d958b9ff931cd1a034f28d0a9eff15663cf0acb75d8d0c91186243fbab94470bf10db SHA512 c685cae0e02a72b797f24a28b9965f8745f165a3ce3a8f3f2e0167ebf6121e92389990870271204ca02b06703f4ad98c6d343345478040f7fc4013b1ce331b03
-DIST opendmarc-1.3.1.tar.gz 640151 BLAKE2B 8e0e29ac9b95730f226a16c6130ff78aca7ecaf8c896864d9868f7d285676b84c2896bd0663fafbd79a9a7e182655a644aa51e37dd23a08662406099a7f1c5d5 SHA512 0be11540bc26bd3b3e6cc9817bc379a5d290b63ef16c5d3559bf96b241ad6628bea7a9daeb468afac855bc16be16676f722b3c1d468ea82c8d8364e8a8137226
 DIST opendmarc-1.3.2.tar.gz 593448 BLAKE2B 80f47a82e38c6cdc5791a695485262c50e9363b81537a52d7af204bd6a830df6eea9e9b6f710b72b7934c3ab7df800def7d4b3e54f53b8908a7f1b42bcea2b2d SHA512 6045fb7d2be8f0ffdeca07324857d92908a41c6792749017c2fcc1058f05f55317b1919c67c780827dd7094ec8fff2e1fa4aeb5bab7ff7461537957af2652748
index e450637a02f665296644e856a3d88c23f3e6812f..90ee5ccb4341040b1806e8a1a020a8d4749426a8 100644 (file)
@@ -1,7 +1,6 @@
 [Unit]
 Description=Domain-based Message Authentication, Reporting and Conformance (DMARC) Milter
-Documentation=man:opendmarc(8) man:opendmarc.conf(5) man:opendmarc-expire(8) man:opendmarc-importstats(8) man:opendmarc-reports(8)
-man:opendmarc-check(8) man:opendmarc-import(8) man:opendmarc-params(8) http://www.trusteddomain.org/opendmarc/
+Documentation=man:opendmarc(8) man:opendmarc.conf(5) man:opendmarc-expire(8) man:opendmarc-importstats(8) man:opendmarc-reports(8) man:opendmarc-check(8) man:opendmarc-import(8) man:opendmarc-params(8) http://www.trusteddomain.org/opendmarc/
 After=network.target nss-lookup.target syslog.target
 
 [Service]
@@ -17,4 +16,4 @@ Restart=on-failure
 RestartSec=3
 
 [Install]
-WantedBy=multi-user.target
\ No newline at end of file
+WantedBy=multi-user.target
diff --git a/mail-filter/opendmarc/opendmarc-1.3.0.ebuild b/mail-filter/opendmarc/opendmarc-1.3.0.ebuild
deleted file mode 100644 (file)
index 7a75141..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit user
-
-DESCRIPTION="Open source DMARC implementation "
-HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
-SRC_URI="mirror://sourceforge/opendmarc/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~x86 ~x86-fbsd"
-IUSE="spf"
-
-DEPEND="dev-perl/DBI
-       || ( mail-filter/libmilter mail-mta/sendmail )"
-RDEPEND="${DEPEND}
-       dev-perl/Switch
-       spf? ( mail-filter/libspf2 )"
-
-pkg_setup() {
-       enewgroup milter
-       enewuser milter -1 -1 /var/lib/milter milter
-}
-
-src_configure() {
-       econf \
-               --docdir="${EPREFIX}"/usr/share/doc/${PF} \
-               --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
-               $(use_with spf)
-}
-
-src_install() {
-       default
-
-       newinitd "${FILESDIR}"/opendmarc.initd opendmarc
-       newconfd "${FILESDIR}"/opendmarc.confd opendmarc
-
-       dodir /etc/opendmarc
-
-       # create config file
-       sed \
-               -e 's/^# UserID .*$/UserID milter/' \
-               -e 's/^# PidFile .*/PidFile \/var\/run\/opendmarc\/opendmarc.pid/' \
-               -e '/^# Socket /s/^# //' \
-               "${S}"/opendmarc/opendmarc.conf.sample \
-               > "${ED}"/etc/opendmarc/opendmarc.conf \
-               || die
-}
similarity index 54%
rename from mail-filter/opendmarc/opendmarc-1.3.1.ebuild
rename to mail-filter/opendmarc/opendmarc-1.3.2-r2.ebuild
index 22347bba5397e667a03683fe6684aa63f2f63eac..1a13e2ea9f9c36f815b51a818bc0567f37267659 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 
-inherit user
+inherit user multilib systemd
 
 DESCRIPTION="Open source DMARC implementation "
 HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
@@ -12,12 +12,16 @@ SRC_URI="mirror://sourceforge/opendmarc/${P}.tar.gz"
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~x86 ~x86-fbsd"
-IUSE="spf"
+IUSE="spf +reports static-libs"
 
-DEPEND="dev-perl/DBI
+DEPEND="reports? ( dev-perl/DBI )
        || ( mail-filter/libmilter mail-mta/sendmail )"
 RDEPEND="${DEPEND}
-       dev-perl/Switch
+       reports? (
+               dev-perl/DBD-mysql
+               dev-perl/HTTP-Message
+               dev-perl/Switch
+       )
        spf? ( mail-filter/libspf2 )"
 
 pkg_setup() {
@@ -25,26 +29,39 @@ pkg_setup() {
        enewuser milter -1 -1 /var/lib/milter milter
 }
 
+src_prepare() {
+       default
+       if use !reports ; then
+               sed -i -e '/^SUBDIRS =/s/reports//' Makefile.in || die
+       fi
+}
+
 src_configure() {
        econf \
                --docdir="${EPREFIX}"/usr/share/doc/${PF} \
                --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
-               $(use_with spf)
+               $(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 milter/' \
-               -e 's/^# PidFile .*/PidFile \/var\/run\/opendmarc\/opendmarc.pid/' \
-               -e '/^# Socket /s/^# //' \
+               -e 's:^# UserID .*$:UserID milter:' \
+               -e "s:^# PidFile .*:PidFile ${EPREFIX}/var/run/opendmarc/opendmarc.pid:" \
+               -e '/^# Socket /s:^# ::' \
                "${S}"/opendmarc/opendmarc.conf.sample \
                > "${ED}"/etc/opendmarc/opendmarc.conf \
                || die