You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.8 KiB
80 lines
1.8 KiB
2 years ago
|
# Copyright 1999-2022 Gentoo Authors
|
||
5 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
2 years ago
|
EAPI=8
|
||
5 years ago
|
|
||
|
DESCRIPTION="Antispam, antivirus and other customizable filters for MTAs with Milter support"
|
||
2 years ago
|
HOMEPAGE="https://www.mimedefang.org/"
|
||
|
SRC_URI="https://mimedefang.org/releases/${P}.tar.gz"
|
||
5 years ago
|
|
||
|
LICENSE="GPL-2+"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
IUSE="clamav +poll test"
|
||
|
RESTRICT="!test? ( test )"
|
||
|
|
||
3 years ago
|
RDEPEND="
|
||
2 years ago
|
|| ( mail-mta/sendmail mail-mta/postfix )
|
||
3 years ago
|
acct-group/defang
|
||
|
acct-user/defang
|
||
5 years ago
|
dev-perl/Digest-SHA1
|
||
3 years ago
|
dev-perl/IO-stringy
|
||
5 years ago
|
dev-perl/MailTools
|
||
3 years ago
|
dev-perl/MIME-tools
|
||
5 years ago
|
dev-perl/Unix-Syslog
|
||
2 years ago
|
mail-filter/libmilter:=
|
||
3 years ago
|
virtual/perl-MIME-Base64
|
||
5 years ago
|
clamav? ( app-antivirus/clamav )
|
||
3 years ago
|
"
|
||
|
|
||
|
DEPEND="
|
||
|
${RDEPEND}
|
||
5 years ago
|
test? (
|
||
|
dev-perl/Test-Class
|
||
|
dev-perl/Test-Most
|
||
3 years ago
|
)
|
||
|
"
|
||
5 years ago
|
|
||
2 years ago
|
PATCHES=(
|
||
|
"${FILESDIR}/${PN}-2.72-ldflags.patch"
|
||
|
"${FILESDIR}/${PN}-vendor.patch"
|
||
|
"${FILESDIR}/${PN}-tests2.patch"
|
||
|
)
|
||
5 years ago
|
|
||
|
src_configure() {
|
||
3 years ago
|
local myeconfargs=(
|
||
|
--with-user=defang
|
||
|
$(use_enable poll)
|
||
|
$(use_enable clamav)
|
||
5 years ago
|
$(use_enable clamav clamd)
|
||
3 years ago
|
)
|
||
|
|
||
|
econf "${myeconfargs[@]}"
|
||
5 years ago
|
}
|
||
|
|
||
|
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."
|
||
|
}
|