# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils IUSE="" MY_P_X86="fp-Linux-i686-ws-${PV}" MY_P_X64="fp-Linux-x86_64-ws-${PV}" MY_P_PPC="fp-Linux-ppc-ws-${PV}" MY_P_X86FBSD="fp-FreeBSD-i386-ws-${PV}" MY_P_X86SOL="fp-SunOS-i386-ws-${PV}" MY_P_SPARCSOL="fp-SunOS-sparc-ws-${PV}" S=${WORKDIR}/${PN} DESCRIPTION="Frisk Software's f-prot virus scanner" HOMEPAGE="http://www.f-prot.com/" SRC_URI="x86? ( http://files.f-prot.com/files/unix-trial/${MY_P_X86}.tar.gz ) amd64? ( http://files.f-prot.com/files/unix-trial/${MY_P_X64}.tar.gz ) ppc? ( http://files.f-prot.com/files/unix-trial/${MY_P_PPC}.tar.gz ) x86-fbsd? ( http://files.f-prot.com/files/unix-trial/${MY_P_X86FBSD}.tar.gz )" DEPEND="" # unzip and perl are needed for the check-updates.pl script RDEPEND=">=app-arch/unzip-5.42-r1 dev-lang/perl dev-perl/libwww-perl" PROVIDE="virtual/antivirus" SLOT="0" LICENSE="F-PROT" KEYWORDS="~amd64 -sparc ~x86" src_install() { cd "${S}" || die dodoc doc/CHANGES dodoc README dohtml doc/html/* doman doc/man/* insinto /opt/f-prot insopts -m 755 doins fpscan doins fpupdate insopts -m 644 doins license.key doins product.data doins product.data.default doins *.def dodir /usr/bin dosym /opt/f-prot/fpscan /usr/bin/fpscan newins f-prot.conf.default f-prot.conf dodir /etc dosym /opt/f-prot/f-prot.conf /etc/f-prot.conf dodir /opt/f-prot/tools /var/tmp/f-prot keepdir /var/tmp/f-prot min=$( date +%S ) echo "#Start fpupdate, every hour, distribute over the hour" >fp-update.cron echo "$min * * * * /opt/f-prot/fpupdate >/dev/null " >>fp-update.cron insinto /etc/cron.d doins fp-update.cron } pkg_postinst() { elog elog "We've generated the following crontab entries to update the" elog "antivir.def file via fpupdate. Updates will be run hourly at a" elog "randomly picked minute to distribute load, and thus make your updates" elog "faster than if they were run during obvious high load times, e.g. on" elog "the hour." elog elog "$min * * * * /opt/f-prot/fpupdate >/dev/null " }