The easiest way to build a Redhat package is to get the latest source rpm from
Dag Wieers, for example
clamav-0.93-1.rf.src.rpm. These normally appear quite soon after an update is available. Change to root and install as normally done for an RPM
rpm -ivh clamav-0.93-1.rf.src.rpm
Change directory to
/usr/src/redhat/SPECS/ and issue the command
rpmbuild -ba --clean clamav.spec
If you are not interested in the sendmail milter, then you can add
--without milter.
If this completed satisfactorily, you will find installation rpms under one of the subdirectories of
/usr/src/redhat/RPMS/ corresponding to your architecture, or some compatible architecture. Install the ones you need with the
rpm upgrade command. You probably need to install the init scripts for freshclam and clamd. An older but more detailed set of instructions by
Thomas Chung includes some scripts that may be suitable.
If this is the first time you are installing, it would probably be easier to use a package manager such as yum to access the precompiled packages at Dag Wieers to ensure that everything installed correctly, and then follow this step to update if necessary.
If Dag Wieers is too slow for your liking, you can get the latest tarball from
Sourceforge, however this does not include the specification file and other startup scripts used specifically for Redhat. It may be possible to grab clamav.spec from an earlier package and edit it to change the release number to match the latest release. You also need the startup scripts freshclam.sh, clamd.sh and clamav-milter.sh and other files associated with them and place these in the SOURCES directory. There is no guarantee that this will work, and if there are patches mentioned in the old specification file, then this procedure probably will fail badly.
--
KenSarkies - 14 Jun 2008
--
MdHIbrahim - 11 Dec 2006