Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/mimedefang/
Date: Sun, 11 Jul 2021 21:23:23
Message-Id: 1626038302.41637206b025f07ce17210d14b9895a6207b3abd.conikost@gentoo
1 commit: 41637206b025f07ce17210d14b9895a6207b3abd
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 11 20:46:16 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 11 21:18:22 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41637206
7
8 mail-filter/mimedefang: migrate to GLEP 81
9
10 Bug: https://bugs.gentoo.org/781308
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
13
14 mail-filter/mimedefang/mimedefang-2.84-r1.ebuild | 78 ++++++++++++++++++++++++
15 1 file changed, 78 insertions(+)
16
17 diff --git a/mail-filter/mimedefang/mimedefang-2.84-r1.ebuild b/mail-filter/mimedefang/mimedefang-2.84-r1.ebuild
18 new file mode 100644
19 index 00000000000..e916663dfa6
20 --- /dev/null
21 +++ b/mail-filter/mimedefang/mimedefang-2.84-r1.ebuild
22 @@ -0,0 +1,78 @@
23 +# Copyright 1999-2021 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +DESCRIPTION="Antispam, antivirus and other customizable filters for MTAs with Milter support"
29 +HOMEPAGE="http://www.mimedefang.org/"
30 +SRC_URI="http://www.mimedefang.org/static/${P}.tar.gz"
31 +
32 +LICENSE="GPL-2+"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~x86"
35 +IUSE="clamav +poll test"
36 +RESTRICT="!test? ( test )"
37 +
38 +RDEPEND="
39 + acct-group/defang
40 + acct-user/defang
41 + dev-perl/Digest-SHA1
42 + dev-perl/IO-stringy
43 + dev-perl/MailTools
44 + dev-perl/MIME-tools
45 + dev-perl/Unix-Syslog
46 + || ( mail-filter/libmilter mail-mta/sendmail )
47 + virtual/perl-MIME-Base64
48 + clamav? ( app-antivirus/clamav )
49 +"
50 +
51 +DEPEND="
52 + ${RDEPEND}
53 + test? (
54 + dev-perl/Test-Class
55 + dev-perl/Test-Most
56 + )
57 +"
58 +
59 +src_prepare() {
60 + eapply "${FILESDIR}/${PN}-2.72-ldflags.patch"
61 + eapply "${FILESDIR}/${PN}-tests.patch"
62 + eapply_user
63 +}
64 +
65 +src_configure() {
66 + local myeconfargs=(
67 + --with-user=defang
68 + $(use_enable poll)
69 + $(use_enable clamav)
70 + $(use_enable clamav clamd)
71 + )
72 +
73 + econf "${myeconfargs[@]}"
74 +}
75 +
76 +src_install() {
77 + emake DESTDIR="${D}" INSTALL_STRIP_FLAG="" install
78 +
79 + fowners defang:defang /etc/mail/mimedefang-filter
80 + fperms 644 /etc/mail/mimedefang-filter
81 + insinto /etc/mail/
82 + newins "${S}"/SpamAssassin/spamassassin.cf sa-mimedefang.cf
83 +
84 + keepdir /var/spool/{MD-Quarantine,MIMEDefang}
85 + fowners defang:defang /var/spool/{MD-Quarantine,MIMEDefang}
86 + fperms 700 /var/spool/{MD-Quarantine,MIMEDefang}
87 +
88 + keepdir /var/log/mimedefang
89 +
90 + newinitd "${FILESDIR}"/${PN}.init ${PN}
91 + newconfd "${FILESDIR}"/${PN}.conf ${PN}
92 +
93 + dodoc -r examples contrib
94 +}
95 +
96 +pkg_postinst() {
97 + elog "You can install Mail::SpamAssassin (mail-filter/spamassassin) and"
98 + elog "HTML::Parser (dev-perl/HTML-Parser) even after installing if you require"
99 + elog "them as they are loaded at run-time."
100 +}