4425dbdab7c9535bb1fb0a5fb1f84eb5d8b2d5ef
[gentoo.git] /
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1.ebuild,v 1.1 2008/07/05 09:46:27 robbat2 Exp $
4
5 MODULE_AUTHOR="DANBORN"
6 inherit perl-module
7
8 DESCRIPTION="SpamAssassin plugin to score mail based on Google blocklists."
9
10 IUSE="test"
11
12 SLOT="0"
13 LICENSE="Apache-2.0"
14 KEYWORDS="~amd64 ~x86 ~ppc"
15 RDEPEND="dev-perl/Net-Google-SafeBrowsing-Blocklist
16                  dev-perl/Net-Google-SafeBrowsing-UpdateRequest
17                  mail-filter/spamassassin"
18 DEPEND="${RDEPEND}
19                 test? ( dev-perl/Test-Pod )"
20
21 SRC_TEST="do"
22
23 src_install() {
24         perl-module_src_install
25         insinto /etc/mail/spamassassin
26         doins "${FILESDIR}"/init_google_safebrowsing.pre
27         doins "${FILESDIR}"/24_google_safebrowsing.cf
28         insinto /etc/cron.d/
29         newins "${FILESDIR}"/update_google_safebrowsing.cron update_google_safebrowsing
30         dosbin "${FILESDIR}"/update_google_safebrowsing.sh
31         keepdir /var/lib/spamassassin/google_safebrowsing/
32 }
33
34 pkg_postinst() {
35         if [ -f ${ROOT}/etc/cron.d/update_google_safebrowsing.sh ]; then
36                 ewarn "You MUST remove ${ROOT}/etc/cron.d/update_google_safebrowsing.sh"
37         fi
38         elog "To use this package:"
39         elog "1. You MUST apply for a free apikey at:"
40         elog "   http://code.google.com/apis/safebrowsing/key_signup.html"
41         elog "2. Place the key into /etc/mail/spamassassin/24_google_safebrowsing.cf"
42         elog "3. Manually run the script /usr/sbin/update_google_safebrowsing.sh"
43         elog "4. Enable the plugin by uncommenting the loadplugin entry in"
44         elog "   /etc/mail/spamassassin/init_google_safebrowsing.pre"
45         elog "5. Restart spamd"
46 }