blob: 80c4242a862d8e8d4575001a29c233f81fbdb111 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Antispam, antivirus and other customizable filters for MTAs with Milter support"
HOMEPAGE="https://www.mimedefang.org/"
SRC_URI="https://mimedefang.org/releases/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="clamav +poll test"
RESTRICT="!test? ( test )"
RDEPEND="
|| ( mail-mta/sendmail mail-mta/postfix )
acct-group/defang
acct-user/defang
dev-perl/Digest-SHA1
dev-perl/IO-stringy
dev-perl/MailTools
dev-perl/MIME-tools
dev-perl/Unix-Syslog
mail-filter/libmilter:=
virtual/perl-MIME-Base64
clamav? ( app-antivirus/clamav )
"
DEPEND="
${RDEPEND}
test? (
dev-perl/Test-Class
dev-perl/Test-Most
)
"
PATCHES=(
"${FILESDIR}/${PN}-2.72-ldflags.patch"
"${FILESDIR}/${PN}-vendor.patch"
"${FILESDIR}/${PN}-tests2.patch"
)
src_configure() {
local myeconfargs=(
--with-user=defang
$(use_enable poll)
$(use_enable clamav)
$(use_enable clamav clamd)
)
econf "${myeconfargs[@]}"
}
src_install() {
emake DESTDIR="${D}" INSTALL_STRIP_FLAG="" install
fowners defang:defang /etc/mail/mimedefang-filter
fperms 644 /etc/mail/mimedefang-filter
insinto /etc/mail/
newins "${S}"/SpamAssassin/spamassassin.cf sa-mimedefang.cf
keepdir /var/spool/{MD-Quarantine,MIMEDefang}
fowners defang:defang /var/spool/{MD-Quarantine,MIMEDefang}
fperms 700 /var/spool/{MD-Quarantine,MIMEDefang}
keepdir /var/log/mimedefang
newinitd "${FILESDIR}"/${PN}.init ${PN}
newconfd "${FILESDIR}"/${PN}.conf ${PN}
dodoc -r examples contrib
}
pkg_postinst() {
elog "You can install Mail::SpamAssassin (mail-filter/spamassassin) and"
elog "HTML::Parser (dev-perl/HTML-Parser) even after installing if you require"
elog "them as they are loaded at run-time."
}
|