Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/utils
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv18281

Modified Files:
        clamav.info 
Log Message:
Move testing to InfoTest and make validator happy

Index: clamav.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/utils/clamav.info,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- clamav.info 11 Dec 2006 21:52:25 -0000      1.10
+++ clamav.info 26 Jan 2007 03:28:37 -0000      1.11
@@ -1,6 +1,7 @@
+Info3: <<
 Package: clamav
 Version: 0.88.7
-Revision: 51
+Revision: 52
 Description: Clam Anti-Virus scanner
 DescDetail: <<
  Clam AntiVirus is an anti-virus scanner written from scratch. It is
@@ -93,7 +94,6 @@
 ConfigureParams: --mandir=%p/share/man --with-dbdir=%p/var/db/%n 
--sysconfdir=%p/etc --disable-dependency-tracking 
 InstallScript: <<
  #!/bin/sh -ev
- /usr/sbin/chown -R root:admin *
  /usr/bin/make install DESTDIR=%d
 
  for configfile in clamd.conf freshclam.conf ; do
@@ -105,40 +105,30 @@
 
  /usr/bin/install -d -m 755 %i/share/doc/%n
  /bin/mv docs/* %i/share/doc/%n
- (cd %i/share/doc/%n; /bin/rm -R Makefile Makefile.am Makefile.in man)
+ (cd %i/share/doc/%n; /bin/rm -R Makefile Makefile.am Makefile.in man) || exit 
1
  /usr/bin/install -d -m 755 %i/share/doc/%n/test/
  /bin/cp -r test/* %i/share/doc/%n/test/
 
  #Remove CVS directories
  /usr/bin/find %i -name "CVS" -type d -depth -exec rm -rf \{\} \;
-
- # run tests
- echo; echo "*** TESTING %n:";
- ( %b/clamscan/clamscan --unrar --database=%b/database %b/test/clam-error.rar; 
)
- result1="$?"; echo "test result 1: ${result1}";
- echo "Done test 1"; echo;
- ( %b/clamscan/clamscan --database=%b/database %b/test/clam.rar; )
- result2="$?"; echo "test result 2: ${result2}"; 
- echo "Done test 2"; echo;
- ( %b/clamscan/clamscan --database=%b/database %b/test/clam.exe; )
- result3="$?"; echo "test result 3: ${result3}";
- echo "Done test 3"; echo;
- ( %b/clamscan/clamscan --database=%b/database %b/test/clam.exe.bz2; )
- result4="$?"; echo "test result 4: ${result4}";
- echo "Done test 4"; echo;
- ( %b/clamscan/clamscan --database=%b/database %b/test/clam.zip; )
- result5="$?"; echo "test result 5: ${result5}";
- echo "Done test 5"; echo;
- ( %b/clamscan/clamscan --database=%b/database %b/test/clam.cab; )
- result6="$?"; echo "test result 6: ${result6}";
- echo "Done test 6"; echo;
- if [ $result1 == "1" ] && [ $result2 == "1" ] && [ $result3 == "1" ] && [ 
$result4 == "1" ] && [ $result5 == "1" ] && [ $result6 == "1" ]; then
-    echo "virus scan tests passed!" ;
-    exit 0;
- else
-    echo "*** virus scan tests failed! ***" ;
-    exit 1;
- fi
+<<
+InfoTest: <<
+ TestSuiteSize: small
+ TestScript: <<
+   #!/bin/sh -ev
+   ( %b/clamscan/clamscan --unrar --database=%b/database 
%b/test/clam-error.rar ) ;
+   if [ $? -ne 1 ] ; then exit 2 ; fi
+   ( %b/clamscan/clamscan --database=%b/database %b/test/clam.rar ) ;
+   if [ $? -ne 1 ] ; then exit 2 ; fi
+   ( %b/clamscan/clamscan --database=%b/database %b/test/clam.exe ) ;
+   if [ $? -ne 1 ] ; then exit 2 ; fi
+   ( %b/clamscan/clamscan --database=%b/database %b/test/clam.exe.bz2 ) ;
+   if [ $? -ne 1 ] ; then exit 2 ; fi
+   ( %b/clamscan/clamscan --database=%b/database %b/test/clam.zip ) ;
+   if [ $? -ne 1 ] ; then exit 2 ; fi
+   ( %b/clamscan/clamscan --database=%b/database %b/test/clam.cab ) ;
+   if [ $? -ne 1 ] ; then exit 2 ; fi
+ <<
 <<
 PreInstScript: <<
  # Remove old virus databases which are not removed by previous clamav packages
@@ -186,6 +176,10 @@
  During the test the virus database isn't actually installed yet so
  the one in the build directory is specified.
 
+ The database directory %i/var/db/%n must be owned by the 'clamav'
+ user. This requires a change of the owner during the build.
+ Therefore, we cannot build as 'nobody'.
+
  Original package maintainer was Carsten Klapp
  <[EMAIL PROTECTED]>.
 <<
@@ -193,3 +187,4 @@
  Install virus databases into %p/var/db/clamav instead of default
  %p/share/clamav; %p/share is for static data.
 <<
+<<


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to