[Legacy] Clamav/SOSDG For Win32
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

clamav-install 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. CLAMAV=/cygdrive/c/clamav-devel
  3. WINPATH=C:/clamav-devel
  4. MNTPATH=/mnt/clamav
  5. DOCFILES="NEWS README BUGS AUTHORS ChangeLog FAQ INSTALL COPYING*"
  6. DOCDIR="docs examples contrib test"
  7. DLLFILES="/bin/cygz.dll /bin/cyggmp-3.dll /bin/cygbz2-1.dll /bin/cygminires.dll"
  8. #DLLFILES="$DLLFILES /bin/cygintl-3.dll /bin/cygiconv-2.dll"
  9. DLLFILES="$DLLFILES /bin/cygwin1.dll"
  10. CYGCLAMVER="4"
  11. CYGWINEXE="/bin/mount.exe /bin/umount.exe /usr/src/psmisc-21.5-3/src/killall.exe"
  12. #CLAMVERS=0.93.1
  13. #cd clamav-$CLAMVERS
  14. CWD=`pwd`
  15. echo "Installing ClamAV..."
  16. make install
  17. echo "Copying over the necessary DLL files that make ClamAV Work..."
  18. cp -f --remove-destination $DLLFILES $CYGWINEXE $CLAMAV/bin/
  19. #cp -f -v --remove-destination /bin/cygwin1-1.5.16.dll $CLAMAV/bin/cygwin1.dll
  20. cp --remove-destination libclamav/.libs/cygclamav-$CYGCLAMVER.dll-def libclamav/.libs/cygclamav-$CYGCLAMVER.dll-exp $CLAMAV/lib
  21. echo "Converting text files to standard Windows linefeeds..."
  22. mount -t $WINPATH $MNTPATH
  23. #cd ..
  24. for i in $DOCFILES; do
  25. echo "Converting $i..."
  26. rm -f $MNTPATH/$i
  27. awk 1 $i > $MNTPATH/$i
  28. done
  29. umount $MNTPATH
  30. echo "Copying over documentation, example, and contrib directories..."
  31. cp -f --remove-destination -R $DOCDIR $CLAMAV
  32. #cd $CWD
  33. cp --remove-destination -R idletimeout.patch clamav-sosdg-1.patch clamav-dll.patch configure-clamav-win32 clamav-install "/cygdrive/c/installer scripts/clamav-devel.nsi" $CLAMAV/sosdg/
  34. find $CLAMAV -name CVS | xargs rm -fr
  35. find $CLAMAV -name ".svn" | xargs rm -fr
  36. find $CLAMAV -name ".cvsignore" | xargs rm -fr
  37. find $CLAMAV -name ".\#*" | xargs rm -fr
  38. chown -R Administrators:Users $CLAMAV
  39. echo "Stripping the applications of debugging symbols..."
  40. strip --strip-debug $CLAMAV/bin/{cygz.dll,cyggmp-3.dll,cygbz2-1.dll,cygminires.dll,cygclamav-$CYGCLAMVER.dll}
  41. strip $CLAMAV/bin/*.exe
  42. #strip --strip-debug $CLAMAV/bin/*.dll
  43. cd $CLAMAV/bin
  44. # Dont rebase cygwin1.dll
  45. #ls | grep -v "cygwin1.dll" > files
  46. #rebaseall -T files
  47. #rm -f files
  48. #rebase -b 0x70000000 -v cygwin1.dll
  49. cd $CWD
  50. rm -fr $CLAMAV/docs/clam.eps $CLAMAV/docs/*.tex $CLAMAV/docs/MacOSX
  51. echo "Done!"