PURPOSE: Automate the building of RPM Packages.
OS TYPE: Red Hat Linux
DIFFICULTY: Advanced
# Run once before starting build process.
~> ./install_prereqs.sh
# Display the help menu.
~> ./create_build_user.sh --help
# Starts the build process
~> ./create_build_user.sh --start
After running the 'create_build_user' script you can then execute switch user command:
~> su - build
[build@build-machine ~]$
Now, you can start the rpmbuild
process.
# Builds the Complete RPM source and binaries.
[build@build-machine ~]$ rpmbuild -ba displaymsg-1.0/displaymsg.spec
# Installs the package/programs
rpm -i -v /home/build/rpmbuild/RPMS/x86_64/displaymsg-1.0-1.x86_64.rpm
Outputs:
Preparing packages...
displaymsg-1.0-1.x86_64