In this article we will create an rpm package frm a source tar.gz file. Here we take the example of proftpd.tar.gz
the tree stucture for rpm
|-- BUILD
|-- RPMS
|-- SOURCES
|-- SPECS
|-- SRPMS
let download proftpd in /usr/local/src and configure it in prefix /usr/local/proftp
tar -xzvf proftpd-cvs-20080928.tar.gz
./configure && make && make install
( you can configure with vairous switches .... with mysql support or ldap support )
Now we create the rpm
in the /usr/src/redhat/SPEC we we create a file called proftpd.spec with the following content
Summary: test rpm Name: test_rpm Version: 1 Release: 1 Vendor: agnello License: Test Group: o BuildRoot: /usr/local/proftpd AutoReq: no AutoReqProv: no %description This package contains nothing . %files %defattr(-, root, root) /bin /etc /include /lib /libexec /sbin /share /var
now we run a rpmbuild to build the i386 rpm package
rpmbuild -ba proftpd.spec
this will create a i386.rpm package in the /usr/src/redhat/RPM/ folder
rpm -ivh test_rpm-1-1.i386.rpm ---- this will intall the RPM package
done !!
No comments:
Post a Comment