# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils AV_VERS="antivir-workstation-2.1.1" AV_DIR="/opt/antivir-workstation" MY_P="${P/antivir-/}" S="${WORKDIR}/${AV_VERS}" DESCRIPTION="H+BEDV AntiVir for UNIX Workstation - Background Daemon" SRC_URI="http://www.hbedv.com/files/antivir/release/avlxwks.tgz" HOMEPAGE="http://www.hbedv.com/" KEYWORDS="x86" LICENSE="H+BEDV GPL-2 BSD" SLOT="0" IUSE="" RDEPEND="=app-antivirus/${AV_VERS} virtual/linux-sources" DEPEND="${RDEPEND}" RESTRICT="nostrip" src_unpack() { unpack ${A} cd ${S}/src tar xzf ${MY_P}.tar.gz } src_install() { cd ${S} dodir ${AV_DIR} exeinto ${AV_DIR} doexe sh/avguard dosed "s:/usr/lib/AntiVir:${AV_DIR}:g" ${AV_DIR}/avguard insinto /etc doins conf/avguard.conf dosed "s:/home/unwanted:${AV_DIR}/quarantine:g" /etc/avguard.conf dodir /etc/init.d exeinto /etc/init.d doexe ${FILESDIR}/avguard dosym ${AV_DIR}/configantivir ${AV_DIR}/configavguard dodir /usr/bin dosym ${AV_DIR}/configavguard /usr/bin/configavguard dodoc legal/LICENSE.dazuko src/HOWTO-Dazuko cd ${S}/src/${MY_P} einfo "cd ${S}/src/${MY_P}" ARCH=i386 ./configure || die "Could not configure module" emake || die "Could not build module" if [ "$(uname -a | grep SMP)" == "" ]; then SMP_POSTFIX="" else SMP_POSTFIX="-smp" fi dodir ${AV_DIR}/linux-$(uname -r)${SMP_POSTFIX} exeinto ${AV_DIR}/linux-$(uname -r)${SMP_POSTFIX} if [ "$(uname -r | grep 2.6)" == "" ]; then doexe dazuko.o else doexe dazuko.ko fi dodoc COPYING LICENSE.BSD LICENSE.GPL README } pkg_postinst() { einfo "How to use H+BEDV AntiVir for UNIX Workstation" einfo einfo "To start the background antivirus daemon on" einfo "system start up, type:" einfo einfo "rc-update add avguard boot" einfo einfo "To configure H+BEDV AntiVir for UNIX Workstation," einfo "type:" einfo einfo "configantivir" einfo einfo "or edit the file /etc/avguard.conf manually." echo sleep 10 }