Steps to Build a RPM Package from Source on CentOS / RedHat | rpm-build | source tar | SPEC file
1) install rpm-build 2) download source tar 3) create SPEC file 4) create RPM file using rpm-build The RPM performs the following tasks during the build process. Executes the commands and macros mentioned in the prep section of the spec file. Checks the content of the file list Executes the commands and macros in the build section of the spec file. Macros from the file list is also executed at this step. Creates the binary package file Creates the source package file Once the RPM executes the above steps, it creates the binary package file and source package file. Let us see how to create a simple source and BIN RPM packages using a tar file. If you are new to rpm package, you may first want to understand how to use rpm command to install, upgrade and remove packages on CentOS or RedHat. 1. Install rpm-build Package To build an rpm file based on the spec file that we just created, we need to use rpmbuild command. rpmbuild command is part of rpm-b...