Archive for the ‘SPR720 – LAB5’ Category

Creating a RPM package for Clam Antivirus – FC9

October 5, 2008
#useradd clamav
#yum install rpmdevtools
#su - clamav
$rpmdev-setuptree

The following directory structure will be created:

            rpmbuild
     /   /      |    \      \
BUILD  RPMS  SOURCES  SPECS  SRPMS

Create a spec file in the folder ~/rpmbuild/SPECS/clam.spec. After that use rpmlint to check the spec file.

$rpmlint clam.spec

To create a src package
$rpmbuild -bs clam.spec

To create a binary file
$rpmbuild -ba clam.spec

Now if it was successful you will have a binary rpm or src.rpm in the directory:
/home/clamav/rpmbuild/RPMS/i386/clamav-0.94-1.fc9.i386.rpm

The packages are available in the following addresses:
http://matrix.senecac.on.ca/~mpaivaneto/clamav-0.94-1.fc9.i386.rpm

http://matrix.senecac.on.ca/~mpaivaneto/clamav-0.94-1.fc9.src.rpm

Links:
(1) http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo