1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

Since the DAT files are so short lived on the server, have this port

automatically fetch the current DAT file.  The uvscan-dat port will
be removed shortly.
This commit is contained in:
James E. Housley 2006-05-09 12:08:51 +00:00
parent c68418ac35
commit e4054d3289
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=161801
5 changed files with 45 additions and 5 deletions

View File

@ -624,7 +624,6 @@
SUBDIR += tripwire12
SUBDIR += tthsum
SUBDIR += unicornscan
SUBDIR += uvscan-dat
SUBDIR += vida
SUBDIR += vlock
SUBDIR += vlog

View File

@ -7,7 +7,7 @@
PORTNAME= uvscan
PORTVERSION= 4.40e
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://download.nai.com/products/evaluation/virusscan/english/cmdline/bsd/v4.40/
DISTNAME= vbsd440e
@ -16,7 +16,6 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= jeh@FreeBSD.org
COMMENT= Evaluation version of a DOS/Windows/Linux file virus scanner
RUN_DEPENDS+= ${LOCALBASE}/sbin/update_dat:${PORTSDIR}/security/uvscan-dat
# misc/compat3x is forbidden, but if it is compiled into the system
# we may still be good to go.
LIB_DEPENDS+= c.3:${PORTSDIR}/misc/compat3x
@ -40,8 +39,11 @@ PROGFILES= contact.txt license.dat license.txt messages.dat \
do-configure:
${SED} <${FILESDIR}/uvscan.sh >${WRKSRC}/uvscan.sh \
-e 's:@@PREFIX@@:${PREFIX}:g'
${SED} -e 's:@PREFIX@:${PREFIX}:g' \
<${FILESDIR}/update_dat >${WRKDIR}/update_dat
do-install:
${MKDIR} ${PREFIX}/libexec/uvscan
${INSTALL_SCRIPT} ${WRKSRC}/uvscan ${PREFIX}/libexec/uvscan
${INSTALL_SCRIPT} ${WRKSRC}/uvscan.sh ${PREFIX}/bin/uvscan
${INSTALL_SCRIPT} ${WRKSRC}/uvscan_secure ${PREFIX}/bin
@ -58,9 +60,12 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/${filename} ${DOCSDIR}
.endfor
.endif
${INSTALL_SCRIPT} ${WRKDIR}/update_dat ${PREFIX}/sbin
@${CAT} ${PKGMESSAGE}
post-install:
${LN} -sf ${PREFIX}/lib/libbsdfv.so.4 \
${PREFIX}/lib/libbsdfv.so
${LN} -sf ${PREFIX}/lib/libbsdfv.so.4 ${PREFIX}/lib/libbsdfv.so
${ECHO_CMD} "Trying to fetch the current DAT file"
${SH} ${PREFIX}/sbin/update_dat
.include <bsd.port.mk>

View File

@ -0,0 +1,31 @@
#!/bin/sh
#
# $Id$
#
cd @PREFIX@/libexec/uvscan/
# Force a low default and then get the current version's value
cur_AVVER="1"
if [ -f "file_id.diz" ]; then
cur_AVVER="`tail -1 file_id.diz | sed -e 's/^(\(4[0-9]*\)).*$/\1/'`"
fi
# Find what the website has for the current version
fetch -q http://download.nai.com/products/datfiles/4.x/nai/update.ini || exit 1
AVVER="`grep DATVersion update.ini | head -1 | cut -f2 -d= | sed -e 's/^\(4[0-9]*\).$/\1/'`"
rm -f update.ini
# Check to make sure the requested version is "newer" then the current
if [ "$cur_AVVER" -lt "$AVVER" ]; then
for i in *.tar ; do
[ -f "$i" ] && mv $i $i.old
done
fetch -q http://download.nai.com/products/datfiles/4.x/nai/dat-$AVVER.tar || exit 1
for i in *.dat ; do
[ -f "$i" ] && cp -p $i $i.bak
done
tar xf dat-$AVVER.tar || exit 1
rm -f *.old
echo "`date` Successfully updated AntiVirus DAT files to $AVVER"
fi
exit 0

View File

@ -0,0 +1,3 @@
NOTE: The update_dat script is useful for automatically downloading
the latest version of the virus definitions without waiting for the
port to be updated.

View File

@ -1,6 +1,7 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2000/06/05 12:01:25 rh Exp $
bin/uvscan
bin/uvscan_secure
sbin/update_dat
lib/libbsdfv.so.4
libexec/uvscan/contact.txt
libexec/uvscan/license.dat
@ -8,3 +9,4 @@ libexec/uvscan/license.txt
libexec/uvscan/messages.dat
libexec/uvscan/signlic.txt
libexec/uvscan/uvscan
@dirrm libexec/uvscan