]> Pileus Git - ~andy/sunrise/blob - app-antivirus/kav4fileservers/kav4fileservers-5.5.3.ebuild
app-antivirus/clamtk: Nuke old, add missing dependency
[~andy/sunrise] / app-antivirus / kav4fileservers / kav4fileservers-5.5.3.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 MY_P="kav4fileservers-linux-${PV}"
8 S="${WORKDIR}/kav4fileservers-linux-install"
9
10 DESCRIPTION="Kaspersky File Server virus scanner"
11 HOMEPAGE="http://www.kaspersky.com/"
12 SRC_URI="ftp://ftp.kaspersky.com/products/release/english/businessoptimal/file_servers/kavlinuxserver/${MY_P}.tar.gz"
13
14 SLOT="0"
15 LICENSE="KASPERSKY"
16 KEYWORDS="~x86"
17 IUSE=""
18
19 DEPEND=""
20 RDEPEND="virtual/cron"
21 PROVIDE="virtual/antivirus"
22 RESTRICT="mirror strip"
23
24 pkg_setup() {
25         enewgroup klusers
26         enewuser kluser -1 -1 /var/db/kav klusers
27 }
28
29 src_compile() {
30         einfo "Nothing to compile, installing Kasperky AV for Fileservers..."
31 }
32
33 src_install() {
34         dodir /var/log/kav/5.5/kav4unix
35         dodir /var/db/kav/5.5/kav4unix/{bases,bases.backup,licenses,patches}
36         fowners kluser:klusers /var/log/kav/5.5/kav4unix
37         fowners kluser:klusers /var/db/kav/5.5/kav4unix/licenses
38         fperms 0770 /var/log/kav/5.5/kav4unix
39         fperms 0770 /var/db/kav/5.5/kav4unix/licenses
40
41         insinto /var/db/kav/5.5/kav4unix/bases
42         doins bases/*
43
44         into /opt/kav/5.5/kav4unix
45         dobin bin/*
46
47         insinto /opt/kav/5.5/kav4unix/contrib
48         insopts -m0755
49         doins contrib/*.sh
50         insopts -m0644
51         doins contrib/*.wbm
52
53         insinto /etc/kav/5.5/kav4unix
54         doins kav4unix/kav4unix.conf
55
56         # TODO: provide a gentooified initscript
57         doinitd "${S}/init.d/kavmonitor"
58
59         dodoc kav4unix/ChangeLog
60         doman man8/*.8
61 }
62
63 pkg_postinst() {
64         ewarn "IMPORTANT!!! You must install a valid Kaspersky Lab license file"
65         ewarn "to use the application. Licenses should be installed into"
66         ewarn "/var/db/kav/5.5/kav4unix/licenses. To do this, run:"
67         ewarn
68         ewarn "    /opt/kav/5.5/kav4unix/bin/licensemanager -a <keyfile> "
69         ewarn
70         ewarn "You need to download the latest anti-virus bases before using"
71         ewarn "this application. To do this, run:"
72         ewarn
73         ewarn "    /opt/kav/5.5/kav4unix/bin/keepup2date"
74
75         elog
76         elog " To keep anti-virus bases up-to-date, create a cron job for KAV:"
77         elog
78         elog " crontab -u kluser -e"
79         elog
80         elog " and add the following line (change the frequency of update if required):"
81         elog
82         elog " * */4 * * *     /opt/kav/5.5/kav4unix/bin/keepup2date >/dev/null 2>&1"
83         elog
84         elog "Configuration file was installed in /etc/kav/5.5/kav4unix/kav4unix.conf."
85         elog "See \"man 8 kav4unix.conf\" for detailed configuration info."
86         elog
87         elog "If you want to use web interface to configure and use Kaspersky Anti-Virus"
88         elog "emerge app-admin/webmin and then install the module via webmin interface."
89         elog "Webmin module is located in /opt/kav/5.5/kav4unix/contrib/kavfs.wbm"
90 }