forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spamassassin-botnet-0.8-r1.ebuild
50 lines (37 loc) · 1.07 KB
/
spamassassin-botnet-0.8-r1.ebuild
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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit perl-module
MY_PN="${PN/b/B}"
MY_PN="${MY_PN/spamassassin-/}"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="SpamAssassin plugin that attempts to detect messages sent by a botnet"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="http://people.ucsc.edu/~jrudd/spamassassin/${MY_P}.tar"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND=">=mail-filter/spamassassin-3.0.0"
RDEPEND="${DEPEND}"
S="${WORKDIR}"
src_compile() {
# make sure it doesn't try to look for the .pm in the same dir as the .cf
sed -rie 's/^(loadplugin.+)[ ]+Botnet.pm/\1/' Botnet.cf
}
src_install() {
perl_set_version
local plugin_dir=${VENDOR_LIB}/Mail/SpamAssassin/Plugin
insinto ${plugin_dir}
doins ${MY_PN}.pm
insinto /etc/mail/spamassassin/
doins ${MY_PN}.cf
dodoc ${MY_PN}{{.{api,credits,variants},}.txt,.pl}
}
pkg_postinst() {
echo
elog "You need to restart spamassassin (as root) before this plugin will work:"
elog "/etc/init.d/spamd restart"
echo
}