Last Update: 10/12/2024
The purpose of this post will to perform a quick review of rpmbuild. rpmbuild is a fundamental tool used to compile and package a rpm from source material.
This can can be a simple process. Having said that there are a number of items that can complicate an otherwise simple process. There are a number of other posts (not listed here) that should be reviewed. Those posts would discuss the rpm command; install gcc
INSTALLING
In SUSE this should be as simple as typing
zypper install rpmdevtools
In a perfect world it would be as simple as that.
SETING UP THE RPMBUILD ENVIRONMENT
This is an important step. The RPMBUILD environment is constructed by the creation of a few directectories and establishing a macros file.
rpmdev-setuptree
The above will set up “rpmbuild” directory and additional subdirectories.
localhost:~ # tree rpmbuild
rpmbuild
├── BUILD
├── BUILDROOT
├── RPMS
├── SOURCES
├── SPECS
└── SRPMS
The .rpmmacros file is created in the root directory of the user account.
-rw-r--r-- 1 root root 228 Oct 12 12:09 .rpmmacros
Besides the rpmbuild structure there is one other item that is setup by this process. a .rpmmacros file gets setup in the root directory. [sigh] live with it. Apparently this is used to setup the macro structure which contributes … well to a lot of the shortcut macros that is regularly used {_topdir etc }
References:
x