I just want to create an RPM file to distribute my Linux binary \"foobar\", with only a couple of dependencies. It has a config file, /etc/foobar.conf and should be installe
install rpm-build and rpmdevtools from yum install. (rpmbuild folder will be generated...SPECS,SOURCES,RPMS.. folders will should be generated inside the rpmbuild folder).
copy the source code.gz to SOURCES folder.(rpmbuild/SOURCES)
Untar the tar ball by using the following command.
go to SOURCES folder :rpmbuild/SOURCES where tar file is present.
command: e.g tar -xvzf httpd-2.22.tar.gz
httpd-2.22 folder will be generated in the same path.
go to extracted folder and then type below command:
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-proxy --enable-proxy-balancer --with-mpm=worker --enable-mods-static=all
(.configure may vary according to source for which RPM has to built-- i have done for apache HTTPD which needs apr and apr-util dependency package).
run below command once the configure is successful:
make
after successfull execution od make command run:
checkinstall
in tha same folder. (if you dont have checkinstall software please download latest version from site)
Also checkinstall software has bug which can be solved by following way:::::
locate checkinstallrc and then replace TRANSLATE = 1 to TRANSLATE=0 using vim command.
Also check for exclude package: EXCLUDE="/selinux"
checkinstall will ask for option (type R if you want tp build rpm for source file)
Done .rpm file will be built in RPMS folder inside rpmbuild/RPMS file...
ALL the BEST ....